bugZ80 assembler - Bugs: bug #25646, DEFW with multiple arguments...

 
 

bug #25646: DEFW with multiple arguments causes infinite loop

Submitted by:  None
Submitted on:  Thu 19 Feb 2009 05:47:50 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 19 Feb 2009 08:52:27 PM UTC, comment #1:

I guess this simple little patch fixes things.

(file #17487)

Anonymous
Thu 19 Feb 2009 05:47:50 PM UTC, original submission:

Using DEFW with more than one argument, e.g.

DEFW $DEAD, $BEEF

causes output "AD DE 00 00 00 ..." and so on with more and more zero bytes.

The do...while loop in the DEFW case (shown below) winds up being an infinite loop--'ptr' never changes from pointing at ", $BEEF".

case DEFW:
case DW:
if (!(r = rd_word (&ptr, ',')))
{
printerr (1, "No data for word definition\n");
break;
}

  • do
  • {
  • new_reference (readword, TYPE_ABSW, ',', 1);
  • }
  • while ((r = rd_word (&ptr, ',')));

break;

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #17487:  25646.patch added by None (382B - text/x-diff - Patch fixing bug)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by shevek (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 11 Apr 2009 12:34:31 PM UTCshevekStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 19 Feb 2009 08:52:27 PM UTCNoneAttached File-=>Added 25646.patch, #17487

    Back to the top


    Powered by Savane 3.1-cleanup1