Skip to content

Commit f0dc761

Browse files
MadVitaliymalaterre
authored andcommitted
fix -Werror=stringop-truncation
1 parent b087726 commit f0dc761

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/DataStructureAndEncodingDefinition/gdcmElement.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ static void x16printf(char *buf, int size, Float f) {
392392
strcpy(buf, mant);
393393
return;
394394
}
395-
strncpy(buf, mant, iexp + 1);
395+
memcpy(buf, mant, iexp + 1);
396396
buf[iexp + 1] = '.';
397397
strncpy(buf + iexp + 2, mant + iexp + 1, size - iexp - 1);
398398
buf[size] = 0;
@@ -409,7 +409,7 @@ static void x16printf(char *buf, int size, Float f) {
409409
for(j=0; j< -1 - iexp; j++) {
410410
buf[j+1] = '0';
411411
}
412-
strncpy(buf - iexp, mant, size + 1 + iexp);
412+
memcpy(buf - iexp, mant, size + 1 + iexp);
413413
buf[size] = 0;
414414
clean(buf);
415415
}

0 commit comments

Comments
 (0)