Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes on St. Tib's day #13

Open
TobiX opened this issue Mar 1, 2016 · 3 comments
Open

Crashes on St. Tib's day #13

TobiX opened this issue Mar 1, 2016 · 3 comments

Comments

@TobiX
Copy link

TobiX commented Mar 1, 2016

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 ;)

@escondida
Copy link

escondida commented Mar 26, 2020

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.

@escondida
Copy link

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.

@danwdart
Copy link
Collaborator

I presume this is indeed the official repo which gets pulled into most distributions' build systems...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants