This commit is contained in:
Aurora
2016-09-22 15:35:28 +02:00
parent a3fd55036a
commit 5e8990f571
2 changed files with 5 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ diff -uNr a/source/brahma.c b/source/brahma.c
+ if (p) {
+ fseek(p , 0, SEEK_END);
+ psize = ftell(p);
+ if (psize > 5 && psize < 39) {
+ if (psize > 5 && psize < 40) {
+ char path[psize + 1];
+
+ fseek(p, 0, SEEK_SET);
@@ -58,7 +58,7 @@ diff -uNr a/source/brahma.c b/source/brahma.c
+ if (bytes_read == psize) {
+ if (path[psize - 1] == 0xA) psize--;
+ if (path[psize - 1] == 0xD) psize--;
+ if (psize > 5 && path[0] == '/' && memcmp(&path[psize - 4], ".bin", 4)) {
+ if (psize > 5 && psize < 38 && path[0] == '/' && memcmp(&path[psize - 4], ".bin", 4)) {
+ path[psize] = 0;
+ f = fopen(path, "rb");
+ use_default = false;