diff options
author | Jan Klass <kissaki@posteo.de> | 2016-11-17 14:59:45 +0300 |
---|---|---|
committer | Jan Klass <kissaki@posteo.de> | 2016-11-17 14:59:45 +0300 |
commit | e2ad9c05f0cff73defe5083e6728ab9b1af63ab9 (patch) | |
tree | e3882263e01ace81722863d84e86337e82b06114 /plugins/bfbc2 | |
parent | 486381c95a5d83f61c47b8e43538c03f341cc8a5 (diff) |
Fix 2643: Revert "Merge PR #2611: plugins: use the short form of peekProc"
This reverts commit e9c558ffdbc1501d63f3fd6d73578f6fd6611aa1, reversing
changes made to ca2fd07b90746a17dba13963f7bdd54812c5d016.
This is a quick-fix for crashing PA plugins. The intended change is
still useful and planned to land later.
Diffstat (limited to 'plugins/bfbc2')
-rw-r--r-- | plugins/bfbc2/bfbc2.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/bfbc2/bfbc2.cpp b/plugins/bfbc2/bfbc2.cpp index 465da8c0c..9b56d5f6a 100644 --- a/plugins/bfbc2/bfbc2.cpp +++ b/plugins/bfbc2/bfbc2.cpp @@ -23,7 +23,7 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa // Find out whether this is the steam version char sMagic[6]; - if (!peekProc(0x015715b4, sMagic)) { + if (!peekProc(0x015715b4, sMagic, 6)) { generic_unlock(); return false; } @@ -31,13 +31,13 @@ static int fetch(float *avatar_pos, float *avatar_front, float *avatar_top, floa is_steam = (strncmp("Score:", sMagic, 6) == 0); if (is_steam) { - ok = peekProc(0x01571E90, avatar_pos) && - peekProc(0x01571E80, avatar_front) && - peekProc(0x01571E70, avatar_top); + ok = peekProc(0x01571E90, avatar_pos, 12) && + peekProc(0x01571E80, avatar_front, 12) && + peekProc(0x01571E70, avatar_top, 12); } else { - ok = peekProc(0x01579600, avatar_pos) && - peekProc(0x015795F0, avatar_front) && - peekProc(0x015795E0, avatar_top); + ok = peekProc(0x01579600, avatar_pos, 12) && + peekProc(0x015795F0, avatar_front, 12) && + peekProc(0x015795E0, avatar_top, 12); } if (! ok) |