<li>Added a new options <span class="argument"><a href="documentation_tools_flac.html#flac_options_preserve_modtime">--preserve-modtime</a></span> and <span class="argument"><a href="documentation_tools_flac.html#flac_options_no_preserve_modtime">--no-preserve-modtime</a></span> to specify whether or not output files should copy the timestamp and permissions from their input files. The default is <span class="argument"><a href="documentation_tools_flac.html#flac_options_preserve_modtime">--preserve-modtime</a></span> as in previous versions. (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1805428&group_id=13478&atid=363478">SF #1805428</a>).</li>
<li>The <span class="argument"><a href="documentation_tools_flac.html#flac_options_sector_align">--sector-align</a></span> option of <span class="commandname">flac</span> has been deprecated and may not exist in future versions. <a href="http://www.etree.org/shnutils/shntool/">shntool</a> provides similar functionality. (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1805946&group_id=13478&atid=363478">SF #1805946</a>)</li>
<li>Fix bug where <span class="commandname">flac</span> was disallowing use of <span class="argument">--replay-gain</span> when encoding from stdin (<a href="https://sourceforge.net/tracker2/?func=detail&aid=1840124&group_id=13478&atid=113478">SF #1840124</a>).</li>
+ <li>Fix bug with fractional seconds on some locales (<a href="https://sourceforge.net/tracker2/?func=detail&aid=1858012&group_id=13478&atid=113478">SF #1858012</a>).</li>
</ul>
</li>
<li>
{
double ret;
unsigned i;
- char c;
+ char c, *endptr;
/* parse [0-9][0-9]*: */
c = *s++;
/* parse [0-9]*[.,]?[0-9]* i.e. a sign-less rational number (. or , OK for fractional seconds, to support different locales) */
if(strspn(s, "1234567890.,") != strlen(s))
return false;
- {
- const char *p = strpbrk(s, ".,");
- if(p && 0 != strpbrk(++p, ".,"))
- return false;
- }
- ret += atof(s);
+ ret += strtod(s, &endptr);
+ if (endptr == s || *endptr)
+ return false;
*value = ret;
return true;