Fix variable initialisation not at the start of the block.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2982 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -205,6 +205,7 @@ InstallResTypeVectors (const char *resType, ResourceLoadFun *loadFun,
|
|||||||
ResourceDesc *result;
|
ResourceDesc *result;
|
||||||
char key[TYPESIZ];
|
char key[TYPESIZ];
|
||||||
int typelen;
|
int typelen;
|
||||||
|
CharHashTable_HashTable *map;
|
||||||
|
|
||||||
snprintf(key, TYPESIZ, "sys.%s", resType);
|
snprintf(key, TYPESIZ, "sys.%s", resType);
|
||||||
key[TYPESIZ-1] = '\0';
|
key[TYPESIZ-1] = '\0';
|
||||||
@@ -229,6 +230,6 @@ InstallResTypeVectors (const char *resType, ResourceLoadFun *loadFun,
|
|||||||
result->vtable = NULL;
|
result->vtable = NULL;
|
||||||
result->resdata.ptr = handlers;
|
result->resdata.ptr = handlers;
|
||||||
|
|
||||||
CharHashTable_HashTable *map = _get_current_index_header ()->map;
|
map = _get_current_index_header ()->map;
|
||||||
return CharHashTable_add (map, key, result) != 0;
|
return CharHashTable_add (map, key, result) != 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user