From: cuz Date: Thu, 14 Apr 2005 20:36:50 +0000 (+0000) Subject: Fixed a bug X-Git-Tag: V2.12.0~383 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6170017f078a9ef36aa6fc1d2e9eddb9d8158d5b;p=cc65 Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@3458 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/studyexpr.c b/src/ca65/studyexpr.c index 2fafda934..407862a17 100644 --- a/src/ca65/studyexpr.c +++ b/src/ca65/studyexpr.c @@ -619,7 +619,7 @@ static void StudyPlus (ExprNode* Expr, ExprDesc* D) StudyExprInternal (Expr->Right, &Right); /* Check if we can handle the operation */ - if (ED_IsValid (D) || ED_IsValid (&Right)) { + if (ED_IsValid (D) && ED_IsValid (&Right)) { /* Add both */ ED_Add (D, &Right); @@ -654,7 +654,7 @@ static void StudyMinus (ExprNode* Expr, ExprDesc* D) StudyExprInternal (Expr->Right, &Right); /* Check if we can handle the operation */ - if (ED_IsValid (D) || ED_IsValid (&Right)) { + if (ED_IsValid (D) && ED_IsValid (&Right)) { /* Subtract both */ ED_Sub (D, &Right);