src/querystring_gui.h
changeset 10276 b60b7e17db62
parent 9916 40b0040c754b
child 10295 52982b3d0d84
equal deleted inserted replaced
10275:2aba46745fcb 10276:b60b7e17db62
    39 };
    39 };
    40 
    40 
    41 struct QueryStringBaseWindow : public Window, public QueryString {
    41 struct QueryStringBaseWindow : public Window, public QueryString {
    42 	char *edit_str_buf;
    42 	char *edit_str_buf;
    43 	char *orig_str_buf;
    43 	char *orig_str_buf;
    44 	const uint16 edit_str_size;
    44 	const uint16 edit_str_size; ///< maximum length of string (in bytes), including terminating '\0'
    45 
    45 
    46 	QueryStringBaseWindow(uint16 size, const WindowDesc *desc, WindowNumber window_number = 0) : Window(desc, window_number), edit_str_size(size)
    46 	QueryStringBaseWindow(uint16 size, const WindowDesc *desc, WindowNumber window_number = 0) : Window(desc, window_number), edit_str_size(size)
    47 	{
    47 	{
       
    48 		assert(size != 0);
    48 		this->edit_str_buf = CallocT<char>(size);
    49 		this->edit_str_buf = CallocT<char>(size);
    49 	}
    50 	}
    50 
    51 
    51 	~QueryStringBaseWindow()
    52 	~QueryStringBaseWindow()
    52 	{
    53 	{