epezent / implot

Immediate Mode Plotting
MIT License
4.64k stars 516 forks source link

Use snprintf instead of sprintf in implot_demo.cpp #426

Closed jminor closed 1 year ago

jminor commented 1 year ago

sprintf is marked as deprecated and/or unsafe by some compilers. For example, clang complains:

implot_demo.cpp:840:17: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]

This PR replaces all calls to sprintf in implot_demo.cpp with snprintf to address this concern.

Addresses #421