fixed printing of booleans
authorMark Linton <linton@ucbvax.Berkeley.EDU>
Tue, 9 Mar 1982 10:57:20 +0000 (02:57 -0800)
committerMark Linton <linton@ucbvax.Berkeley.EDU>
Tue, 9 Mar 1982 10:57:20 +0000 (02:57 -0800)
SCCS-vsn: usr.bin/pascal/pdx/sym/printval.c 1.5

usr/src/usr.bin/pascal/pdx/sym/printval.c

index 37ee1b3..8b463f0 100644 (file)
@@ -1,6 +1,6 @@
 /* Copyright (c) 1982 Regents of the University of California */
 
 /* Copyright (c) 1982 Regents of the University of California */
 
-static char sccsid[] = "@(#)printval.c 1.4 %G%";
+static char sccsid[] = "@(#)printval.c 1.5 %G%";
 
 /*
  * Print out the value at the top of the stack using the given type.
 
 /*
  * Print out the value at the top of the stack using the given type.
@@ -53,7 +53,7 @@ SYM *s;
            } else if (s == t_char) {
                printf("'%c'", pop(char));
            } else if (s == t_boolean) {
            } else if (s == t_char) {
                printf("'%c'", pop(char));
            } else if (s == t_boolean) {
-               printf(pop(BOOLEAN)==TRUE ? "true" : "false");
+               printf(popsmall(s) == TRUE ? "true" : "false");
            } else {
                printf("%ld", popsmall(s));
            }
            } else {
                printf("%ld", popsmall(s));
            }