
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
John Gaughan typed...
[...]
> file.seekp (494844, ios::beg);
> file.seekg (494844, ios::beg);
[...]
Shouldn't those be
file.seekp (0x494844, ios::beg);
file.seekg (0x494844, ios::beg);
or am I missing something obvious, like the default base being hex? I've
done no more C++ than reading some books a couple of years ago
Anyway here's a "perl at bash prompt" version
$ perl -pi~ -0777e 'substr($_,0x494844,1)=chr(0x7)' tnt.wad
pros: look how short it is!
cons: it sucks the whole file into memory, changes one byte and spits it
out again so it's grossly inefficient.
--
RjY/anARCHy >o o< http://www.triv.org.uk/~rjy/
| <-- __Chronological__ --> | <-- __Thread__ --> |