X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fasm.c;fp=src%2Fasm.c;h=e8a20fe9dd5a4f6708cfd9ca345e1b002164e861;hb=8760c1ba6442153afe76bcac742e086f90c59fe8;hp=3467100ad779290ad9bbb123dafed7db9a496be4;hpb=46cb3ffad9e3ed318a9109ff96421882f6642b2b;p=inform.git diff --git a/src/asm.c b/src/asm.c index 3467100..e8a20fe 100644 --- a/src/asm.c +++ b/src/asm.c @@ -1,9 +1,8 @@ /* ------------------------------------------------------------------------- */ /* "asm" : The Inform assembler */ /* */ -/* Copyright (c) Graham Nelson 1993 - 2020 */ -/* */ -/* This file is part of Inform. */ +/* Part of Inform 6.35 */ +/* copyright (c) Graham Nelson 1993 - 2020 */ /* */ /* Inform is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ @@ -2078,13 +2077,13 @@ static void transfer_routine_g(void) ((form_len == 2) ? "short" : "long"))); } if (form_len == 1) { - if (addr < -0x80 && addr >= 0x80) { + if (addr < -0x80 || addr >= 0x80) { error("*** Label out of range for byte branch ***"); } - zcode_holding_area[i] = (addr) & 0xFF; + zcode_holding_area[i] = (addr) & 0xFF; } else if (form_len == 2) { - if (addr < -0x8000 && addr >= 0x8000) { + if (addr < -0x8000 || addr >= 0x8000) { error("*** Label out of range for short branch ***"); } zcode_holding_area[i] = (addr >> 8) & 0xFF;