http://d.puremagic.com/issues/show_bug.cgi?id=8811

           Summary: sscanf %n bug
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nob...@puremagic.com
        ReportedBy: stas...@yahoo.com


--- Comment #0 from stas <stas...@yahoo.com> 2012-10-13 07:52:34 PDT ---
Applies to: DMD 2.060
System: Windows XP SP3

sscanf %n incorrectly works after reading last character.

Code:
import std.stdio, std.string;

alias toStringz z;

void main()
{
    int n;
    sscanf("a".z, "a%n".z, &n);
    assert(n==1); // fail
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to