Re: [cc65] weird range error

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2005-04-14 22:37:05
On Thu, Apr 14, 2005 at 10:20:24PM +0200, MagerValp wrote:
> OK, thanks.

Another solution is to apply the following patch to studyexpr.c:

----------------------------------------------------------------------------
Index: studyexpr.c
===================================================================
RCS file: /usr/local/cvsroot/uz/c64/cc65/src/ca65/studyexpr.c,v
retrieving revision 1.6
diff -c -b -r1.6 studyexpr.c
*** studyexpr.c	19 Dec 2004 22:15:43 -0000	1.6
--- studyexpr.c	14 Apr 2005 20:34:57 -0000
***************
*** 619,625 ****
      StudyExprInternal (Expr->Right, &Right);

      /* Check if we can handle the operation */
!     if (ED_IsValid (D) || ED_IsValid (&Right)) {

          /* Add both */
          ED_Add (D, &Right);
--- 619,625 ----
      StudyExprInternal (Expr->Right, &Right);

      /* Check if we can handle the operation */
!     if (ED_IsValid (D) && ED_IsValid (&Right)) {

          /* Add both */
          ED_Add (D, &Right);
***************
*** 654,660 ****
      StudyExprInternal (Expr->Right, &Right);

      /* Check if we can handle the operation */
!     if (ED_IsValid (D) || ED_IsValid (&Right)) {

          /* Subtract both */
          ED_Sub (D, &Right);
--- 654,660 ----
      StudyExprInternal (Expr->Right, &Right);

      /* Check if we can handle the operation */
!     if (ED_IsValid (D) && ED_IsValid (&Right)) {

          /* Subtract both */
          ED_Sub (D, &Right);
----------------------------------------------------------------------------

Thanks for the feedback!

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Apr 14 22:38:14 2005

This archive was generated by hypermail 2.1.8 : 2005-04-14 22:38:16 CEST