bugGNU Octave - Bugs: bug #63467, sscanf duplicates last value when...

 
 

bug #63467: sscanf duplicates last value when string containing multiple values finished with space

Submitter:  None
Submitted:  Mon 05 Dec 2022 04:17:06 AM UTC
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Confirmed Assigned to:  rik5
Originator Name:  koerhen Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  9.1.0 (current default)
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Tue 06 Dec 2022 10:19:02 PM UTC, comment #3: 

Oops, wrong bug report.  Disregard the last message.

Rik <rik5>
Project Administrator
Tue 06 Dec 2022 10:18:25 PM UTC, comment #2: 

Can you try the attached patch? 63647.diff

(file #54065)

Rik <rik5>
Project Administrator
Tue 06 Dec 2022 09:55:06 PM UTC, comment #1: 

Confirmed, and it was introduced in cset 53fee053d962.

Rik <rik5>
Project Administrator
Mon 05 Dec 2022 04:17:06 AM UTC, original submission:  

With the current master version
self build 9.0 from this Thursday
hg log -l1 changeset:   31598:53fee053d962 # HG changeset patch)

(s)scanf wrongly duplicates the last value of a string containing multiple values and ending with a space.
Without a space at the end there is no duplication.

(I guess error is introduced with changeset 31542:2f08a53e0a23)

sscanf ('2 3 ', '%f')
ans =

   2
   3
   3

sscanf ('2 3', '%f')
ans =

   2
   3

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #54065:  63467.diff added by rik5 (573B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-12-06 rik5 Attached File- Added 63467.diff, #54065
    2022-12-06 rik5 Item GroupNone Regression
        StatusNone Confirmed
        Assigned toNone rik5
        Releaseother dev
        Planned ReleaseNone 9.1.0 (current default)

    Back to the top

    Powered by Savane 3.10