makerom v0.6

This commit is contained in:
3DSGuy
2014-04-08 13:09:00 +08:00
parent 26772b49c8
commit 9cb89cbe8b
59 changed files with 2935 additions and 2662 deletions
+7
View File
@@ -348,6 +348,7 @@ u32 SetYAMLSequence(char ***dest, char *key, ctr_yaml_context *ctx)
ActualCount++;
if(ActualCount >= SlotCount){ // if Exceeding Ptr capacity, expand buffer
SlotCount = SlotCount*2;
/*
char **tmp1 = malloc((SlotCount+1)*sizeof(char*)); // allocate new buffer
if(!tmp1){
ctx->error = YAML_MEM_ERROR;
@@ -357,6 +358,12 @@ u32 SetYAMLSequence(char ***dest, char *key, ctr_yaml_context *ctx)
for(u32 i = 0; i < ActualCount; i++) tmp1[i] = tmp[i]; // Transfer ptrs
free(tmp); // free original buffer
tmp = tmp1; // transfer main ptr
*/
tmp = realloc(tmp,(SlotCount+1)*sizeof(char*));
if(!tmp){
ctx->error = true;
return 0;
}
}
FinishEvent(ctx);
GetEvent(ctx);