Fixed various potential bugs and compiler warnings

This commit is contained in:
Mathias Tillman committed 2013-01-07 15:57:19 +01:00
1 parent 03eacd1af3
commit b780e39397
10 files changed
+62 -40

No files matched your search

+4 -1
View File
@@ -143,7 +143,10 @@ bool SymbolMap::LoadSymbolMap(const char *filename)
while (!feof(f))
{
char line[512],temp[256];
fgets(line,511,f);
char *p = fgets(line,512,f);
if(p == NULL)
break;
if (strlen(line) < 4 || sscanf(line, "%s", temp) != 1)
continue;