bugGNU Octave - Bugs: bug #33950, strread in dev src doesn't honor...

 
 

bug #33950: strread in dev src doesn't honor user-specified width for %Ns format

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Fri 05 Aug 2011 08:53:23 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 09 Aug 2011 02:45:41 PM UTC, comment #3: 

I've applied both patches (http://hg.savannah.gnu.org/hgweb/octave/rev/3509cf60d1f6) and strread works correctly on the sample string that I had posted.  Closing this bug.

Rik <rik5>
Group administrator
Tue 09 Aug 2011 06:57:19 AM UTC, comment #2: 

The patch I originally sent in has nothing to do with this one.

AFAICS you've hit a bug, or corner case, in the format-to-column matching code.
Fix attached (diff -u).

While checking this out I also hit bug #33971...


(file #23765)

Philip Nienhuis <philipnienhuis>
Group Member
Mon 08 Aug 2011 11:25:30 PM UTC, comment #1: 

Could you also supply a test to verify that this patch is working?  I thought I understood it, but I obviously don't.  I tried:


strread ("Hello World", '%2s')
warning: division by zero
warning: division by zero
error: strread: invalid conversion from NaN to logical
error: called from:
error:   /home/rik/downloads/local/share/octave/3.5.0+/m/io/strread.m at line 480, column 7


I had expected "He" and "Wo" to be returned.

Rik <rik5>
Group administrator
Fri 05 Aug 2011 08:53:23 AM UTC, original submission:  

A small debug thing accidentally left behind in the code.

Changeset attached.

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #23765:  strread.m.diff_9aug2011 added by philipnienhuis (327B - application/octet-stream)
file #23743:  strread_prcnt_N_s-wdth.patch added by philipnienhuis (712B - application/octet-stream)

 

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)
  • -email is unavailable- added by philipnienhuis (Submitted the item)
  •  

    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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-08-09 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2011-08-09 philipnienhuis Attached File- Added strread.m.diff_9aug2011, #23765
    2011-08-08 rik5 StatusNone Patch Submitted
    2011-08-05 philipnienhuis Attached File- Added strread_prcnt_N_s-wdth.patch, #23743

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code