[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Segfault while handling a Symbol literal

From: Jānis Rūcis
Subject: [Help-smalltalk] Segfault while handling a Symbol literal
Date: Tue, 27 Mar 2007 22:33:52 +0300
User-agent: Icedove (X11/20070307)

While playing with various combinations of characters in Symbol literals
I discovered that a negative number, as in "#-123", causes a memory
access violation.  The code is just way over my head so I wasn't able to
figure out a fix for it...  But while I was looking at it, I noticed a
typo in print_token, in libgst/lex.c and fixed that instead.  :P  See
the attached patch.

Index: libgst/lex.c
--- libgst/lex.c        (revision 2)
+++ libgst/lex.c        (working copy)
@@ -1170,7 +1170,7 @@
       printf ("FLOATQ_LITERAL: %Lg\n", yylval->fval);
     case CHAR_LITERAL:
-      printf ("CHAR_LITERAL: %d", yylval->ival, 
+      printf ("CHAR_LITERAL: %d", yylval->ival);
       if (yylval->ival >= 32 && yylval->ival <= 126)
        printf (" ($%c)", (char) yylval->ival);
       printf ("\n");

reply via email to

[Prev in Thread] Current Thread [Next in Thread]