X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fasm.c;h=faace9c168ad549a8c3e6ebfcacb751bd18931b9;hb=c881aa3386c00d7021ffabf2f66275d6c110c1c1;hp=a5444fd589d92f71d0838a53bfb0493b17d3d66a;hpb=81ffe9a7de1db0b3a318a053b38882d1b7ab304c;p=inform.git diff --git a/src/asm.c b/src/asm.c index a5444fd..faace9c 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 - 2021 */ /* */ /* 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;