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
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 02 Mar 2024 10:07:40 PM UTC, comment #4: 

I checked in jwe's changeset on stable here:

https://hg.savannah.gnu.org/hgweb/octave/rev/9c08824262af

On the development branch, I restored the BIST test that check that the error message is empty:

https://hg.savannah.gnu.org/hgweb/octave/rev/2ff2d201a344

This will now produce a failing test on dev.

Rik <rik5>
Group administrator
Tue 06 Dec 2022 10:19:02 PM UTC, comment #3: 

Oops, wrong bug report.  Disregard the last message.

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

Can you try the attached patch? 63647.diff

(file #54065)

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

Confirmed, and it was introduced in cset 53fee053d962.

Rik <rik5>
Group 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

Digest:
   bug dependencies.

 

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 group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-02 rik5 Dependencies- bugs #65390 is dependent
    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

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code