Am Montag, 20. Januar 2020 20:05:36 UTC+1 schrieb kornel:
>
> Thanks, but the buffer size is 10. How can 16 digits fit there? 
> You meant 6 digits probably? 
>

No, I meant 16. The warning was in line 525:
std::sprintf(fmt,"%%.%df",digits);
Here only the format string is build. So for 16 digits fmt becomes "%.16f". 
This is shorter than the 10 bytes of fmt.
(The warning above the overflow would result when digits>=1000000, because 
then fmt would become "%.1000000f" which will not fit into char fmt[10].)

The actual conversion of the double to string is done in line 530ff:
#ifdef _MSC_VER
    _snprintf (c, 1023, fmt, d);
#else
    snprintf (c, 1023, fmt, d);
#endif
Here we have a buffer with length 1024.

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/0865a34a-7cc7-4adb-858b-d795a0834408%40googlegroups.com.

Reply via email to