summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-25 15:17:50 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-01-25 15:17:50 +0200
commitff2df2ac545bb36ca4c1d2f872236cdf0a7218ab (patch)
treedf3c0f31373ac65f38df0061fc8ec180abde1993 /loader
parent8dd016c538340e4a50628eedae0561d45c95ef6b (diff)
parent5f5462c0ec32348a0b370b1f9c11bd7d10b52de6 (diff)
downloadmpv-ff2df2ac545bb36ca4c1d2f872236cdf0a7218ab.tar.bz2
mpv-ff2df2ac545bb36ca4c1d2f872236cdf0a7218ab.tar.xz
Merge svn changes up to r30322
Diffstat (limited to 'loader')
-rw-r--r--loader/win32.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/loader/win32.c b/loader/win32.c
index 70070832f6..3b0dd5bb3e 100644
--- a/loader/win32.c
+++ b/loader/win32.c
@@ -5326,6 +5326,8 @@ struct libs libraries[]={
static WIN_BOOL WINAPI ext_stubs(void)
{
+ // NOTE! these magic values will be replaced at runtime, make sure
+ // add_stub can still find them if you change them.
volatile int idx = 0x0deadabc;
// make sure gcc does not do eip-relative call or something like that
void (* volatile my_printf)(char *, char *) = (void *)0xdeadfbcd;
@@ -5355,7 +5357,7 @@ static void* add_stub(void)
memcpy(answ, ext_stubs, MAX_STUB_SIZE);
for (i = 0; i < MAX_STUB_SIZE - 3; i++) {
int *magic = (int *)(answ + i);
- if (*magic == 0xdeadabcd) {
+ if (*magic == 0x0deadabc) {
*magic = pos;
found |= 1;
}