https://d.puremagic.com/issues/show_bug.cgi?id=12507
Summary: SysTime.init.toString should not segfault
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Vladimir Panteleev <[email protected]> 2014-04-03
06:26:34 EEST ---
SysTime.init.toString unconditionally dereferences the timezone field
(indirectly - it calls adjTime which does so), which will be null for
SysTime.init.
This needlessly complicates debugging - writeln(t) will segfault if t has not
been set.
Question: what should be returned? null? "null" the string literal (like what
printf does for null pointers)? The time sans timezone ("0001-Jan-01
00:00:00")?
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------