summaryrefslogtreecommitdiffstats
path: root/canonicalize.patch
blob: 3ff9c3330cbc45c3f867da5192f4a4c50826fec6 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- source/common/uloc.c	2011-12-12 04:50:00.601092000 -0500
+++ source/common/uloc.c	2011-12-12 04:56:18.503570000 -0500
@@ -1712,7 +1712,7 @@
         /* Check for EURO variants. */
         sawEuro = _deleteVariant(variant, variantSize, "EURO", 4);
         len -= sawEuro;
-        if (sawEuro > 0 && name[len-1] == '_') { /* delete trailing '_' */
+        if (sawEuro > 0 && len > 0 && name[len-1] == '_') { /* delete trailing '_' */
             --len;
         }