misc_gui.c
changeset 4949 6bf60913767f
parent 4948 22ff05c1a3b1
child 4955 1ffc9ce449a8
equal deleted inserted replaced
4948:22ff05c1a3b1 4949:6bf60913767f
  1092 	DeleteWindowById(WC_SAVELOAD, 0);
  1092 	DeleteWindowById(WC_SAVELOAD, 0);
  1093 
  1093 
  1094 	w = AllocateWindowDesc(&_query_string_desc);
  1094 	w = AllocateWindowDesc(&_query_string_desc);
  1095 
  1095 
  1096 	GetString(_edit_str_buf, str, lastof(_edit_str_buf));
  1096 	GetString(_edit_str_buf, str, lastof(_edit_str_buf));
  1097 	_edit_str_buf[realmaxlen-1] = '\0';
  1097 	_edit_str_buf[realmaxlen - 1] = '\0';
  1098 
  1098 
  1099 	if (maxlen & 0x1000) {
  1099 	if (maxlen & 0x1000) {
  1100 		WP(w, querystr_d).orig = NULL;
  1100 		WP(w, querystr_d).orig = NULL;
  1101 	} else {
  1101 	} else {
  1102 		strcpy(_orig_str_buf, _edit_str_buf);
  1102 		strecpy(_orig_str_buf, _edit_str_buf, lastof(_orig_str_buf));
  1103 		WP(w, querystr_d).orig = _orig_str_buf;
  1103 		WP(w, querystr_d).orig = _orig_str_buf;
  1104 	}
  1104 	}
  1105 
  1105 
  1106 	LowerWindowWidget(w, 5);
  1106 	LowerWindowWidget(w, 5);
  1107 	WP(w, querystr_d).caption = caption;
  1107 	WP(w, querystr_d).caption = caption;