diff --git a/doc/Changelog.html b/doc/Changelog.html
index 9fdc61a3..ad6696d1 100644
--- a/doc/Changelog.html
+++ b/doc/Changelog.html
@@ -26,11 +26,12 @@ a:visited { color: #0000EE; }
Updated MediaInfo to v0.7.64 (2013-07-05), compiled with ICL 13.1 and MSVC 10.0
Updated GnuPG to v1.4.14 (2013-07-25), compiled with GCC 4.8.1
Updated GNU Wget binary to v1.13.4 (2011-09-17)
+Updated language files (big thank-you to all contributors !!!)
Fixed a potential deadlock during startup when %TMP% points to an invalid folder
Fixed a superfluous "beep" sound that appeared on application startup
Fixed the Ogg Vorbis quality modes "-1" and "-2" (those were clipped to "0" before)
Fixed a bug that could cause the output directory to be reset mistakenly
-Implemented "natural ordering" for sorting input files, using strnatcmp() by Martin Pool
+Implemented "natural order" string comparison/sorting, using strnatcmp() by Martin Pool
Changes between v4.06 and v4.07 [2013-04-28]:
diff --git a/etc/Prerequisites/strnatcmp/src/strnatcmp.cpp b/etc/Prerequisites/strnatcmp/src/strnatcmp.cpp
index 402260da..173fb49d 100644
--- a/etc/Prerequisites/strnatcmp/src/strnatcmp.cpp
+++ b/etc/Prerequisites/strnatcmp/src/strnatcmp.cpp
@@ -59,6 +59,7 @@ static inline nat_char nat_isdecpoint(nat_char a)
{
return (a == L'.') || (a == L',');
}
+
static inline nat_char nat_toupper(nat_char a)
{
return towupper(a);
@@ -123,12 +124,12 @@ static int strnatcmp0(nat_char const *a, nat_char const *b, const bool fold_case
int ai, bi;
nat_char ca, cb;
int result;
- bool fractional, skip_zeros;
+ bool fractional;
int sa, sb;
assert(a && b);
ai = bi = 0;
- skip_zeros = true;
+ fractional = false;
while (1)
{
@@ -146,14 +147,18 @@ static int strnatcmp0(nat_char const *a, nat_char const *b, const bool fold_case
{
sa = sb = 0;
- if(skip_zeros)
+ if(!fractional)
{
- while (ca == L'0') { ca = a[++ai]; sa++; }
- while (cb == L'0') { cb = b[++bi]; sb++; }
+ while (ca == L'0')
+ {
+ ca = a[++ai]; sa++;
+ }
+ while (cb == L'0')
+ {
+ cb = b[++bi]; sb++;
+ }
}
- fractional = (ca == L'0' || cb == L'0');
-
if (fractional)
{
if ((result = compare_left(a+ai, b+bi)) != 0)
@@ -191,7 +196,7 @@ static int strnatcmp0(nat_char const *a, nat_char const *b, const bool fold_case
return +1;
/* skipp leading zero's, unless previously seen char was a decimal point */
- skip_zeros = (!nat_isdecpoint(ca)) || (!nat_isdecpoint(cb));
+ fractional = nat_isdecpoint(ca) && nat_isdecpoint(cb);
++ai; ++bi;
}
diff --git a/src/Config.h b/src/Config.h
index d1963c0a..fbea00bf 100644
--- a/src/Config.h
+++ b/src/Config.h
@@ -34,7 +34,7 @@
#define VER_LAMEXP_MINOR_LO 8
#define VER_LAMEXP_TYPE RC
#define VER_LAMEXP_PATCH 2
-#define VER_LAMEXP_BUILD 1333
+#define VER_LAMEXP_BUILD 1336
#define VER_LAMEXP_CONFG 1288
///////////////////////////////////////////////////////////////////////////////