]> git.sur5r.net Git - cc65/blobdiff - src/cc65/exprnode.c
Fixed a bug in signed int compares
[cc65] / src / cc65 / exprnode.c
index 7cf7aa1001d6714f87b025fe780f1dc7048c06ef..8bffe688fcc09c4d3955017c30cb85665af1d6be 100644 (file)
@@ -92,7 +92,7 @@ void SetItem (ExprNode* N, void* Item, unsigned Index)
 {
     if (Index >= CollCount (&N->List)) {
        /* Fill up with NULL pointers */
-               while (Index >= CollCount (&N->List) < Index) {
+               while (Index >= CollCount (&N->List)) {
            CollAppend (&N->List, 0);
        }
        /* Append the new item */
@@ -148,7 +148,7 @@ void SetRightNode (ExprNode* Root, ExprNode* Right)
 struct SymEntry* GetNodeSym (ExprNode* N)
 /* Get the symbol entry for a NT_SYM node */
 {
-    return GetItem (N, IDX_SYM);
+    return (struct SymEntry*) GetItem (N, IDX_SYM);
 }
 
 
@@ -247,7 +247,7 @@ void DumpExpr (FILE* F, const ExprNode* E)
            case NT_LIST_EXPR:
                Count = CollCount (&E->List);
                for (I = 0; I < Count; ++I) {
-                   DumpExpr (F, CollConstAt (&E->List, I));
+                   DumpExpr (F, (const ExprNode*) CollConstAt (&E->List, I));
                }
                break;