https://d.puremagic.com/issues/show_bug.cgi?id=11778
Summary: format for null does not verify fmt flags. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: monarchdo...@gmail.com --- Comment #0 from monarchdo...@gmail.com 2013-12-19 12:42:54 PST --- Printing pointer types is supposed to only work with %X, %x or %s. However, if the passed pointer is null, there is no actual fmt validation: //---- import std.stdio; void main() { int* p; writefln(s, p); writefln(s, p + 1); } //---- null std.format.FormatException@std/format.d(2957): Expected one of %s, %x or %X for pointer type. //---- This can be an issue, as an invalid format flag may end up throwing depending on the *value* passed (and not the type). The bug may only reveal itself unexpectedly at a later date. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------