[Issue 20393] New: formattedRead accepts input, that should be rejected
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Nov 14 18:19:01 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=20393
          Issue ID: 20393
           Summary: formattedRead accepts input, that should be rejected
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at d-ecke.de
---
import std.format;
void main()
{
    string str = "foo 12a-buzz";
    string a, c;
    int b;
    formattedRead(str, "%s %d-%s", &a, &b, &c);
    assert(c == "a"); // just for showing, what happens
}
---
Should throw an exception but doesn't.
--
    
    
More information about the Digitalmars-d-bugs
mailing list