Skip to content

Commit 96a9a2d

Browse files
Update wcstombs-s-wcstombs-s-l.md
count should reserve one place for terminating null character.
1 parent 7720a97 commit 96a9a2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/c-runtime-library/reference/wcstombs-s-wcstombs-s-l.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ int main( void )
145145

146146
// Conversion
147147
wcstombs_s(&i, pMBBuffer, (size_t)BUFFER_SIZE,
148-
pWCBuffer, (size_t)BUFFER_SIZE );
148+
pWCBuffer, (size_t)BUFFER_SIZE - 1);
149149

150150
// Output
151151
printf(" Characters converted: %u\n", i);

0 commit comments

Comments
 (0)