bugAVR C Runtime Library - Bugs: bug #4010, itoa.S: casual minus sign for...

 
 

bug #4010: itoa.S: casual minus sign for non-decimal radix

Submitted by:  None
Submitted on:  Tue 17 Jun 2003 09:45:03 PM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPercent Complete: 0%
Assigned to: Invalid User ID <Invalid User ID>Originator Email: -unavailable-
Open/Closed: ClosedRelease: None
Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 20 Jun 2003 04:19:07 PM UTC, comment #1:

Fix from Reiner Patommel committed. The doxygen is untested.

Eric Weddington <arcanum>
Project Administrator
Tue 17 Jun 2003 09:45:03 PM UTC, original submission:

1. There is no clearing "T" in a case when "radix" it is not equal 10. It
results, for example, in the following:
itoa(0, s, 10) --> "0"
itoa(-2, s, 8) --> "177776" (T was 0)
itoa(-2, s, 10) --> "-2" (T set 1)
itoa(-2, s, 8) --> "-177776"

2. Erroneous "radix" results in unpredictable consequences: a call "strrev" with "value" as the address of a string. Apparently, instead of:
cpi r_radix, 2 ; no radix < 2
brlt terminate
it is necessary to put:
cpi r_radix, 2 ; no radix < 2
brlt n_terminate

P.S. After addition "clt" it is possible to compensate increase of the size, having replaced a sequence "clr/bld/tst/breq" on "brtc".

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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
Fri 20 Jun 2003 04:19:07 PM UTCarcanumOpen/ClosedOpen=>(Error - Not Found)
Fri 20 Jun 2003 04:19:06 PM UTCarcanumStatusNone=>(Error - Not Found)
Thu 19 Jun 2003 06:06:34 PM UTCarcanumAssigned toNone=>NA

Back to the top


Powered by Savane 3.1-cleanup1