From 15bb1b1312e4e652c4681b74b0358e93566a3718 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 16 Jun 2013 17:41:26 +0200 Subject: [PATCH] Revert "CStringInput: - don't use sizeof pointer" This reverts commit a805a274c7aac03774c843f9aabb2a00b9e04280. I have the correct version of this in my tree. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7097abe42040105c936807b82966029280a3fc44 Author: Stefan Seyfried Date: 2013-06-16 (Sun, 16 Jun 2013) --- src/gui/widget/stringinput.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 9220b5f61..03455ddf3 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -208,7 +208,7 @@ void CStringInput::NormalKeyPressed(const neutrino_msg_t key) } paintChar(selected); }else{ - snprintf(value, size,"%s",tmp_value.c_str()); + snprintf(value, sizeof(value),"%s",tmp_value.c_str()); } } } @@ -288,7 +288,7 @@ void CStringInput::keyUpPressed() if( (lower_bound == -1 || upper_bound == -1) || (current_value > 0 && current_value > lower_bound && current_value < upper_bound) ){ paintChar(selected); }else{ - snprintf(value, size,"%s",tmp_value.c_str()); + snprintf(value, sizeof(value),"%s",tmp_value.c_str()); } } @@ -308,7 +308,7 @@ void CStringInput::keyDownPressed() if( (lower_bound == -1 || upper_bound == -1) || (current_value > 0 && current_value > lower_bound && current_value < upper_bound) ){ paintChar(selected); }else{ - snprintf(value, size,"%s",tmp_value.c_str()); + snprintf(value, sizeof(value),"%s",tmp_value.c_str()); } }