|
1 | 1 | /* ----------------------------------------------------------------------- |
2 | 2 | * formatting.c |
3 | 3 | * |
4 | | - * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.143 2008/06/23 19:27:19 momjian Exp $ |
| 4 | + * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.144 2008/06/26 16:06:37 teodor Exp $ |
5 | 5 | * |
6 | 6 | * |
7 | 7 | * Portions Copyright (c) 1999-2008, PostgreSQL Global Development Group |
@@ -1454,7 +1454,7 @@ str_tolower(char *buff, size_t nbytes) |
1454 | 1454 | /* Output workspace cannot have more codes than input bytes */ |
1455 | 1455 | workspace= (wchar_t*)palloc((nbytes+1)*sizeof(wchar_t)); |
1456 | 1456 |
|
1457 | | -char2wchar(workspace,nbytes+1,buff,nbytes+1); |
| 1457 | +char2wchar(workspace,nbytes+1,buff,nbytes); |
1458 | 1458 |
|
1459 | 1459 | for (curr_char=0;workspace[curr_char]!=0;curr_char++) |
1460 | 1460 | workspace[curr_char]=towlower(workspace[curr_char]); |
@@ -1502,7 +1502,7 @@ str_toupper(char *buff, size_t nbytes) |
1502 | 1502 | /* Output workspace cannot have more codes than input bytes */ |
1503 | 1503 | workspace= (wchar_t*)palloc((nbytes+1)*sizeof(wchar_t)); |
1504 | 1504 |
|
1505 | | -char2wchar(workspace,nbytes+1,buff,nbytes+1); |
| 1505 | +char2wchar(workspace,nbytes+1,buff,nbytes); |
1506 | 1506 |
|
1507 | 1507 | for (curr_char=0;workspace[curr_char]!=0;curr_char++) |
1508 | 1508 | workspace[curr_char]=towupper(workspace[curr_char]); |
@@ -1551,7 +1551,7 @@ str_initcap(char *buff, size_t nbytes) |
1551 | 1551 | /* Output workspace cannot have more codes than input bytes */ |
1552 | 1552 | workspace= (wchar_t*)palloc((nbytes+1)*sizeof(wchar_t)); |
1553 | 1553 |
|
1554 | | -char2wchar(workspace,nbytes+1,buff,nbytes+1); |
| 1554 | +char2wchar(workspace,nbytes+1,buff,nbytes); |
1555 | 1555 |
|
1556 | 1556 | for (curr_char=0;workspace[curr_char]!=0;curr_char++) |
1557 | 1557 | { |
|