Update to commit e2647ad952b4d7afc9a186429c181efbc4958786
[inform.git] / src / asm.c
index 3467100ad779290ad9bbb123dafed7db9a496be4..e8a20fe9dd5a4f6708cfd9ca345e1b002164e861 100644 (file)
--- 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;