%.s expects an int as the length specifier, so cast properly.
This commit is contained in:
parent
560daf85d9
commit
ad852a184d
@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -1002,7 +1003,7 @@ main(int argc, char **argv)
|
|||||||
char *sep = strchr(locale, '_');
|
char *sep = strchr(locale, '_');
|
||||||
if (sep != NULL && isupper(sep[1]) &&
|
if (sep != NULL && isupper(sep[1]) &&
|
||||||
isupper(sep[2])) {
|
isupper(sep[2])) {
|
||||||
asprintf(&lang_locale, "%.*s%s", sep - locale, locale, &sep[3]);
|
asprintf(&lang_locale, "%.*s%s", (int)(ptrdiff_t)(sep - locale), locale, &sep[3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user