summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/lib/libc/port/locale/collate.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/src/lib/libc/port/locale/collate.c b/usr/src/lib/libc/port/locale/collate.c
index 5428f7aa94..9064ca685f 100644
--- a/usr/src/lib/libc/port/locale/collate.c
+++ b/usr/src/lib/libc/port/locale/collate.c
@@ -588,9 +588,10 @@ _collate_sxfrm(const wchar_t *src, char *xf, size_t room)
if (room) {
while (b) {
b--;
- if (room)
+ if (room) {
*xf++ = buf[b];
- room--;
+ room--;
+ }
}
}
need = want;
@@ -613,9 +614,10 @@ _collate_sxfrm(const wchar_t *src, char *xf, size_t room)
while (b) {
b--;
- if (room)
+ if (room) {
*xf++ = buf[b];
- room--;
+ room--;
+ }
}
}
need = want;