Fix separator usage in UTF8 output http://bugs.gentoo.org/139409 http://sourceforge.net/mailarchive/forum.php?thread_id=14805424&forum_id=12495 --- smartmontools-5.36/ataprint.c +++ smartmontools-5.36/ataprint.c @@ -445,7 +445,7 @@ unsigned short lba_64 = drive->words088_255[103-88]; uint64_t capacity_short=0, capacity=0, threedigits, power_of_ten; int started=0,k=1000000000; - char separator=','; + char *separator=","; // get correct character to use as thousands separator #ifdef HAVE_LOCALE_H @@ -453,7 +453,7 @@ setlocale (LC_ALL, ""); currentlocale=localeconv(); if (*(currentlocale->thousands_sep)) - separator=*(currentlocale->thousands_sep); + separator=currentlocale->thousands_sep; #endif // #ifdef HAVE_LOCALE_H // if drive supports LBA addressing, determine 32-bit LBA capacity @@ -485,7 +485,7 @@ capacity -= threedigits*power_of_ten; if (started) // we have already printed some digits - pstring += sprintf(pstring, "%c%03"PRIu64, separator, threedigits); + pstring += sprintf(pstring, "%s%03"PRIu64, separator, threedigits); else if (threedigits || k==6) { // these are the first digits that we are printing pstring += sprintf(pstring, "%"PRIu64, threedigits);