foxygit / doom Log in
commit 71ea0f904f3d1212d9b29f22575de43ad07e5853
Author:     Turo Lamminen <turotl@gmail.com>
AuthorDate: Tue Mar 13 19:53:42 2018 +0200
Commit:     Turo Lamminen <turotl@gmail.com>
CommitDate: Tue Mar 13 19:53:42 2018 +0200

    Make TXT_SetRadioButtonLabel value parameter const
---
 textscreen/txt_radiobutton.c | 2 +-
 textscreen/txt_radiobutton.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/textscreen/txt_radiobutton.c b/textscreen/txt_radiobutton.c
index e165ff2c..31d9fb9d 100644
--- a/textscreen/txt_radiobutton.c
+++ b/textscreen/txt_radiobutton.c
@@ -135,7 +135,7 @@ txt_radiobutton_t *TXT_NewRadioButton(char *label, int *variable, int value)
     return radiobutton;
 }

-void TXT_SetRadioButtonLabel(txt_radiobutton_t *radiobutton, char *value)
+void TXT_SetRadioButtonLabel(txt_radiobutton_t *radiobutton, const char *value)
 {
     free(radiobutton->label);
     radiobutton->label = strdup(value);
diff --git a/textscreen/txt_radiobutton.h b/textscreen/txt_radiobutton.h
index ec5eead8..9e550733 100644
--- a/textscreen/txt_radiobutton.h
+++ b/textscreen/txt_radiobutton.h
@@ -72,7 +72,7 @@ txt_radiobutton_t *TXT_NewRadioButton(char *label, int *variable, int value);
  * @param value          The new label (UTF-8 format).
  */

-void TXT_SetRadioButtonLabel(txt_radiobutton_t *radiobutton, char *value);
+void TXT_SetRadioButtonLabel(txt_radiobutton_t *radiobutton, const char *value);

 #endif /* #ifndef TXT_RADIOBUTTON_H */