Opened 2 years ago

Closed 2 years ago

#13809 closed defect (fixed)

11th hour localized file issue & fix

Reported by: lolovo Owned by: lolovo
Priority: normal Component: Engine: Groovie
Version: Keywords: groovie2
Cc: Game: 11th Hour

Description

Hi,

I've faced with an issue described here - https://forums.scummvm.org/viewtopic.php?t=16661. As it was mentioned it is a specific of localized files. I've noticed that in roq.cpp:547 for seek of end position endpos is used and this leeds to crash, but maybe appropriate try will be using file->pos in this case (I'm not the spicialist in scummvm code, as well as groovie engine). Anyway when file->pos is used the issue is solved (no crash anymore). The fix is the following:

...
	if (endpos != _file->pos()) {
		warning("Groovie::ROQ: BLOCK %04x Should have ended at %d, and has ended at %d", blockHeader.type, endpos, (int)_file->pos());
		warning("Ensure you've copied the files correctly according to the wiki.");
		_file->seek(_file->pos());//was _file->seek(endpos);
	}
...

Could you please verify this and maybe integrate this in project. With this fix my issue is solved. Thanks!

Change History (4)

comment:1 by antoniou79, 2 years ago

You could issue a Pull Request with this fix. Although, if it's specific to this fan made translation maybe it would be better to restrict it so that it will only apply there -- this would need also to update the code in detection to recongnize this fan made localization.

I cannot say if it's the correct fix, but a few days ago on Discord I mentioned the issue to Die4Ever, who is the main developer working on the Groovie engine, so he might be available to provide a review for a potential PR.

comment:2 by lolovo, 2 years ago

Thanks for an answer! Done!
P.S. Appropriate fix would be getting MIN(_file->pos(),endpos)

comment:3 by Die4Ever, 2 years ago

I merged the pull request, thank you! sorry I took so long, been busy

Last edited 2 years ago by Die4Ever (previous) (diff)

comment:4 by Die4Ever, 2 years ago

Owner: set to lolovo
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.