ref: 7862764e12a25b6b83aeca026ddf4432046ad307
parent: 729ba987bddc2a99ae441fa015cfa53d1ee1cc1e
author: Turo Lamminen <turotl@gmail.com>
date: Sat May 19 10:59:14 EDT 2018
dehacked: Make DEH_snprintf fmt parameter const
--- a/src/deh_str.c
+++ b/src/deh_str.c
@@ -417,7 +417,7 @@
// snprintf(), performing a replacement on the format string.
-void DEH_snprintf(char *buffer, size_t len, char *fmt, ...)
+void DEH_snprintf(char *buffer, size_t len, const char *fmt, ...)
{
va_list args;
const char *repl;
--- a/src/deh_str.h
+++ b/src/deh_str.h
@@ -27,7 +27,7 @@
const char *DEH_String(const char *s) PRINTF_ARG_ATTR(1);
void DEH_printf(const char *fmt, ...) PRINTF_ATTR(1, 2);
void DEH_fprintf(FILE *fstream, const char *fmt, ...) PRINTF_ATTR(2, 3);
-void DEH_snprintf(char *buffer, size_t len, char *fmt, ...) PRINTF_ATTR(3, 4);
+void DEH_snprintf(char *buffer, size_t len, const char *fmt, ...) PRINTF_ATTR(3, 4);
void DEH_AddStringReplacement(const char *from_text, const char *to_text);