From 556b86164090720c6476073404e1493f82859859 Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 14 May 2004 15:05:51 +0000 Subject: [PATCH] Better error messages in case of a range error git-svn-id: svn://svn.cc65.org/cc65/trunk@3042 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/segment.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } } } -- 2.39.5