diff -ur --exclude=CVS ScummVM/tools/extract.c ScummVM+hack/tools/extract.c
old
|
new
|
|
53 | 53 | fclose(output_idx); |
54 | 54 | |
55 | 55 | output_idx = fopen(oggmode ? OUTPUT_OGG : OUTPUT_MP3, "wb"); |
56 | | writeUint32BE(input, (uint32)idx_size); |
| 56 | writeUint32BE(output_idx, (uint32)idx_size); |
57 | 57 | |
58 | 58 | in = fopen(TEMP_IDX, "rb"); |
59 | 59 | while ((size = fread(buf, 1, 2048, in)) > 0) { |
… |
… |
|
112 | 112 | exit(-1); |
113 | 113 | tags -= 8; |
114 | 114 | |
115 | | writeUint32BE(input, (uint32)pos); |
116 | | writeUint32BE(input, (uint32)ftell(output_snd)); |
117 | | writeUint32BE(input, tags); |
| 115 | writeUint32BE(output_idx, (uint32)pos); |
| 116 | writeUint32BE(output_idx, (uint32)ftell(output_snd)); |
| 117 | writeUint32BE(output_idx, tags); |
118 | 118 | while (tags > 0) { |
119 | 119 | fputc(fgetc(input), output_snd); |
120 | 120 | tags--; |
… |
… |
|
143 | 143 | } |
144 | 144 | fclose(f); |
145 | 145 | |
146 | | writeUint32BE(input, tot_size); |
| 146 | writeUint32BE(output_idx, tot_size); |
147 | 147 | } |
148 | 148 | |
149 | 149 | void showhelp(char *exename) |