]> git.sur5r.net Git - cc65/commitdiff
Better error messages in case of a range error
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 14 May 2004 15:05:51 +0000 (15:05 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Fri, 14 May 2004 15:05:51 +0000 (15:05 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3042 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/segment.c

index 27066844f529e0d37b100eb2d2a105d393f38f0a..2f23e2069964d01569e1951a70a97ef91d53c4a0 100644 (file)
@@ -314,24 +314,24 @@ void SegCheck (void)
                        if (Abs) {
                            /* Absolute value */
                            if (Val > 255) {
-                               PError (&F->Pos, "Range error");
+                               PError (&F->Pos, "Range error (%ld not in [0..255])", Val);
                            }
                        } else {
                            /* PC relative value */
                            if (Val < -128 || Val > 127) {
-                               PError (&F->Pos, "Range error");
+                               PError (&F->Pos, "Range error (%ld not in [-128..127])", Val);
                            }
                        }
                    } else if (F->Len == 2) {
                        if (Abs) {
                            /* Absolute value */
                            if (Val > 65535) {
-                               PError (&F->Pos, "Range error");
+                               PError (&F->Pos, "Range error (%ld not in [0..65535])", Val);
                            }
                        } else {
                            /* PC relative value */
                            if (Val < -32768 || Val > 32767) {
-                               PError (&F->Pos, "Range error");
+                               PError (&F->Pos, "Range error (%ld not in [-32768..32767])", Val);
                            }
                        }
                    }