From: cuz Date: Thu, 11 Oct 2001 19:58:16 +0000 (+0000) Subject: Add a missing type in range check X-Git-Tag: V2.12.0~2557 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f0ed4af252bba877085d900da82bcf448426d674;p=cc65 Add a missing type in range check git-svn-id: svn://svn.cc65.org/cc65/trunk@1038 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/swstmt.c b/src/cc65/swstmt.c index f085754d6..c1317449f 100644 --- a/src/cc65/swstmt.c +++ b/src/cc65/swstmt.c @@ -142,13 +142,15 @@ void SwitchStatement (void) Error ("Range error"); } break; - + + case T_SHORT: case T_INT: if (Val < -32768 || Val > 32767) { Error ("Range error"); } break; - + + case T_USHORT: case T_UINT: if (Val < 0 || Val > 65535) { Error ("Range error"); @@ -225,7 +227,7 @@ void SwitchStatement (void) /* Eat the closing curly brace */ NextToken (); - + /* Free the case value tree */ FreeCaseNodeColl (Nodes);