fix: prevent unwanted sign-extension in the get4 routine

This commit is contained in:
ceriel 1989-03-30 09:34:43 +00:00
parent 6ac4bb17aa
commit 96840e712d

View file

@ -83,8 +83,8 @@ char *sect;
long addr; long addr;
{ {
#ifdef WORDS_REVERSED #ifdef WORDS_REVERSED
return ((long)get2(sect,addr) << 16) | get2(sect, addr+2); return ((long)get2(sect,addr) << 16) | (get2(sect, addr+2) & 65535L);
#else #else
return ((long)get2(sect,addr+2) << 16) | get2(sect, addr); return ((long)get2(sect,addr+2) << 16) | (get2(sect, addr) & 65535L);
#endif #endif
} }