Mercurial > otakunoraifu
comparison scn2k/scn2k_grp.cc @ 8:55b577e5f5b5
Some memory leaks fixed
author | thib |
---|---|
date | Tue, 05 Aug 2008 12:56:51 +0000 |
parents | aa0577c1a494 |
children | dac3a35aeff6 |
comparison
equal
deleted
inserted
replaced
7:fa8511a21d05 | 8:55b577e5f5b5 |
---|---|
1267 char* data = info->CopyRead(); | 1267 char* data = info->CopyRead(); |
1268 int sz = info->Size(); | 1268 int sz = info->Size(); |
1269 delete info; | 1269 delete info; |
1270 | 1270 |
1271 | 1271 |
1272 if ( strncmp(data, "CGTABLE", 7) != 0) return; | 1272 if ( strncmp(data, "CGTABLE", 7) != 0) { |
1273 delete[] data; | |
1274 return; | |
1275 } | |
1273 int cgm_size = read_little_endian_int(data+0x10); | 1276 int cgm_size = read_little_endian_int(data+0x10); |
1274 | 1277 |
1275 int i,j; | 1278 int i,j; |
1276 // xor ²ò½ü | 1279 // xor ²ò½ü |
1277 for (i=0;i<sz-0x20; i++) { | 1280 for (i=0;i<sz-0x20; i++) { |
1287 for (i=0; i<cgm_size; i++) { | 1290 for (i=0; i<cgm_size; i++) { |
1288 char* s = dest + i * 36; | 1291 char* s = dest + i * 36; |
1289 int n = read_little_endian_int(dest + i * 36 + 32); | 1292 int n = read_little_endian_int(dest + i * 36 + 32); |
1290 cgm_info[s] = n; | 1293 cgm_info[s] = n; |
1291 } | 1294 } |
1295 delete[] data; | |
1292 delete[] dest_orig; | 1296 delete[] dest_orig; |
1293 } | 1297 } |
1294 | 1298 |
1295 /***************************************************** | 1299 /***************************************************** |
1296 * | 1300 * |