parent
df1918935e
commit
5e66a497cf
|
@ -198,7 +198,8 @@ ThemeExtract(const char *path)
|
||||||
char s[FILEPATH_LEN_MAX];
|
char s[FILEPATH_LEN_MAX];
|
||||||
char th[FILEPATH_LEN_MAX];
|
char th[FILEPATH_LEN_MAX];
|
||||||
FILE *f;
|
FILE *f;
|
||||||
unsigned char buf[320];
|
unsigned char buf[262];
|
||||||
|
size_t ret;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
/* its a directory - just use it "as is" */
|
/* its a directory - just use it "as is" */
|
||||||
|
@ -215,7 +216,8 @@ ThemeExtract(const char *path)
|
||||||
f = fopen(path, "r");
|
f = fopen(path, "r");
|
||||||
if (!f)
|
if (!f)
|
||||||
return NULL;
|
return NULL;
|
||||||
fread(buf, 1, 320, f);
|
ret = fread(buf, 1, sizeof(buf), f);
|
||||||
|
memset(buf + ret, 0, sizeof(buf) - ret);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
name = fileof(path);
|
name = fileof(path);
|
||||||
|
|
Loading…
Reference in New Issue