forked from e16/e16
1
0
Fork 0

remove compile warning

SVN revision: 40977
This commit is contained in:
Peter Wehrfritz 2009-06-08 23:25:26 +00:00
parent df1918935e
commit 5e66a497cf
1 changed files with 4 additions and 2 deletions

View File

@ -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);