Skip to content

Commit 13894bd

Browse files
jkseppanQuLogic
andauthored
Use sizeof instead of strlen
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent 454a26e commit 13894bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extern/ttconv/pprdrv_tt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ F2DOT14 getF2DOT14(BYTE *s)
140140
*/
141141
char* F2DOT14value(F2DOT14 f)
142142
{
143-
const size_t maxlen = strlen("-1.234567") + 1;
143+
const size_t maxlen = sizeof("-1.234567");
144144
char *value = (char*)calloc(sizeof(char), maxlen);
145145
if (value == NULL ||
146146
snprintf(value, maxlen, "%.6f", f.whole + (float)f.fraction/16384) < 0) {

0 commit comments

Comments
 (0)