|
|
@@ -196,7 +196,7 @@ int js_read_file(const char* filename, char **script)
|
|
|
if(!length) return 0;
|
|
|
|
|
|
*script = (char *)rt_malloc(length + 1);
|
|
|
- if(!(*script)) retrun 0;
|
|
|
+ if(!(*script)) return 0;
|
|
|
(*script)[length] = '\0';
|
|
|
fp = fopen(filename,"rb");
|
|
|
if(!fp)
|
|
|
@@ -205,7 +205,7 @@ int js_read_file(const char* filename, char **script)
|
|
|
*script = RT_NULL;
|
|
|
return 0;
|
|
|
}
|
|
|
- if(fread(*script,length,1,fp)) != 1)
|
|
|
+ if(fread(*script,length,1,fp) != 1)
|
|
|
{
|
|
|
length = 0;
|
|
|
rt_free(*script);
|