Use ntstring for UI_KEYPAD description

This commit is contained in:
Kp 2014-12-22 04:35:48 +00:00
parent 180999eed1
commit a9998476a9
2 changed files with 3 additions and 3 deletions

View file

@ -36,6 +36,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "varutil.h"
#include "window.h"
#include "compiler-array.h"
#include "ntstring.h"
struct grs_bitmap;
struct grs_canvas;
@ -46,7 +47,7 @@ struct UI_KEYPAD {
typedef array<buttontext_element_t, 17> buttontext_t;
UI_KEYPAD();
unsigned numkeys;
array<char, 100> description;
ntstring<99> description;
array<short, 100> keycode;
array<int, 100> function_number;
buttontext_t buttontext;

View file

@ -382,8 +382,7 @@ void ui_pad_read( int n, const char * filename )
switch( linenumber+1 )
{
case 1:
strncpy(kpn.description.data(), buffer, kpn.description.size() - 1);
kpn.description.back() = 0;
kpn.description.copy_if(line);
break;
//===================== ROW 0 ==============================
case 3: