ddate
ddate copied to clipboard
Crashes on St. Tib's day
Well, okay, only with "invalid" format string, but this
ddate "+%}%{" 29 2 2012
creates an endless loop (or anything else resulting in tib_end < tib_start like %A%e).
suggestions:
in line 262:
if(tib_start>=0) tib_end=i+1;
after the first loop, add a sanity check:
if (tib_end < tib_start) tib_end = tib_start + 1;
This will probably fix half of the only bug documented in the man page ;)
I've fixed this, I believe, over at https://github.com/escondida/ddate . I'd initially planned to do a proper pull request (even started with a different one), but since this repo seems to be abandoned, I've just forked for now. If it revives...great. Otherwise, schism is an act of worship.
As a side note, I've fixed the "undefined" behavior when you ask for, say, the weekday name or day number on St. Tib's Day but didn't include %{ beforehand.
I presume this is indeed the official repo which gets pulled into most distributions' build systems...