]> git.donarmstrong.com Git - lilypond.git/commit
Issue 3832: react sanely to ill-formed version strings
authorDavid Kastrup <dak@gnu.org>
Wed, 3 Sep 2014 17:29:27 +0000 (19:29 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 8 Sep 2014 07:33:17 +0000 (09:33 +0200)
commit3a92b9350ec40cb050934f9632c92d2c0d1d1fc3
treebb1541136bde8ce719f97b42b66ad633f240321a
parent0627899b489d2d7ebe3e3733e27f3fd39a619b53
Issue 3832: react sanely to ill-formed version strings

Mostly, this cleans up Lilypond_version

We no longer convert to int because it is weird, but we still want
version comparisons.  Conversion to bool for checking validity seems
nice in addition.

And bombing out because of invalid data to String_convert::dec2int
seemed definitely non-nice.  This version requires specifying at
least major and minor version number explicitly separated by dots.

It accepts a trailing dot, too.  A trailing extra_patch_string after
major.minor.patchlevel. is also accepted but not interpreted.
lily/include/lilypond-version.hh
lily/lexer.ll
lily/lilypond-version.cc