CStringInput: - don't use sizeof pointer

Origin commit data
------------------
Commit: 2c0838eb06
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2013-05-30 (Thu, 30 May 2013)
This commit is contained in:
Jacek Jendrzej
2013-05-30 12:41:11 +02:00
parent 4849dec9de
commit a805a274c7

View File

@@ -208,7 +208,7 @@ void CStringInput::NormalKeyPressed(const neutrino_msg_t key)
} }
paintChar(selected); paintChar(selected);
}else{ }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) ){ if( (lower_bound == -1 || upper_bound == -1) || (current_value > 0 && current_value > lower_bound && current_value < upper_bound) ){
paintChar(selected); paintChar(selected);
}else{ }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) ){ if( (lower_bound == -1 || upper_bound == -1) || (current_value > 0 && current_value > lower_bound && current_value < upper_bound) ){
paintChar(selected); paintChar(selected);
}else{ }else{
snprintf(value, sizeof(value),"%s",tmp_value.c_str()); snprintf(value, size,"%s",tmp_value.c_str());
} }
} }