Skip to content

Commit

Permalink
M302de: Original-Bugfix: spell_verwandlung() format string
Browse files Browse the repository at this point in the history
In the original a format string is broken which results in
a broken output, too.
The fault is in the datafiles, but it's easy to fix here.

All german version (1.00, 1.04, 1.06, 1.07, 3.02) have this bug.

Reproduce: Cast "Verwandlung" on a hero which does not need it.
  • Loading branch information
Henrik Kretzschmar committed Mar 20, 2014
1 parent b47e423 commit 49d0354
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/custom/schick/rewrite_m302de/seg099.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ void spell_verwandlung(void)
(char*)Real2Host(ds_readd(SPELLTARGET)) + 0x10);
} else {

#ifdef M302de_ORIGINAL_BUGFIX
/* Broken format string, %S must be %s */
host_writeb(get_dtp(0x14) + 5, 's');
#endif

sprintf((char*)Real2Host(ds_readd(DTP2)),
(char*)get_dtp(0x14),
(char*)Real2Host(ds_readd(SPELLTARGET)) + 0x10);
Expand Down

0 comments on commit 49d0354

Please sign in to comment.