X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fasm.c;h=e8a20fe9dd5a4f6708cfd9ca345e1b002164e861;hb=8760c1ba6442153afe76bcac742e086f90c59fe8;hp=a5444fd589d92f71d0838a53bfb0493b17d3d66a;hpb=81ffe9a7de1db0b3a318a053b38882d1b7ab304c;p=inform.git diff --git a/src/asm.c b/src/asm.c index a5444fd..e8a20fe 100644 --- a/src/asm.c +++ b/src/asm.c @@ -1,9 +1,8 @@ /* ------------------------------------------------------------------------- */ /* "asm" : The Inform assembler */ /* */ -/* Copyright (c) Graham Nelson 1993 - 2018 */ -/* */ -/* 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;