From a805a274c7aac03774c843f9aabb2a00b9e04280 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 30 May 2013 12:41:11 +0200 Subject: [PATCH] CStringInput: - don't use sizeof pointer Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/2c0838eb064c07584ed04a5792a92af0505a52f9 Author: Jacek Jendrzej Date: 2013-05-30 (Thu, 30 May 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 7b85123ac..9ff781c1d 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, sizeof(value),"%s",tmp_value.c_str()); + snprintf(value, size,"%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, sizeof(value),"%s",tmp_value.c_str()); + snprintf(value, size,"%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, sizeof(value),"%s",tmp_value.c_str()); + snprintf(value, size,"%s",tmp_value.c_str()); } }