fixed warning: 'sizeof (buffer_char)' will return the size of the pointer, not the array itself [-Wsizeof-pointer-div]

640 |             strncpy(info->f_ext, buffer_char, sizeof(buffer_char)/sizeof(*buffer_char));
This commit is contained in:
Gregor Weiss 2024-04-24 16:20:02 +00:00
parent 515685ce18
commit b5244d2817

View file

@ -637,7 +637,7 @@ parse_main_header(bwc_data *const data,bitstream *const stream)
info->precision = codec_prec = (uint8)get_symbol(stream, 1);
buffer_char = (char*)get_chunck(stream, 10);
strncpy(info->f_ext, buffer_char, sizeof(buffer_char)/sizeof(*buffer_char));
strncpy(info->f_ext, buffer_char, 10);
free(buffer_char);
for(p = 0; p < nPar; ++p)
@ -1783,4 +1783,4 @@ parse_codestream(bwc_data *const data, uint8 const layer)
free(stream);
return field;
}
}