From: cuz Date: Fri, 14 May 2004 15:05:51 +0000 (+0000) Subject: Better error messages in case of a range error X-Git-Tag: V2.12.0~788 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=556b86164090720c6476073404e1493f82859859;p=cc65 Better error messages in case of a range error git-svn-id: svn://svn.cc65.org/cc65/trunk@3042 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/segment.c b/src/ca65/segment.c index 27066844f..2f23e2069 100644 --- a/src/ca65/segment.c +++ b/src/ca65/segment.c @@ -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); } } }