* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
if (SP_PARM->_slk->maxlen <= 0
|| SP_PARM->_slk->labcnt <= 0
|| (SP_PARM->_slk->ent = typeCalloc(slk_ent,
if (SP_PARM->_slk->maxlen <= 0
|| SP_PARM->_slk->labcnt <= 0
|| (SP_PARM->_slk->ent = typeCalloc(slk_ent,
SP_PARM->_slk->ent[i].ent_text = (char *) _nc_doalloc(0, used);
if (SP_PARM->_slk->ent[i].ent_text == 0)
SP_PARM->_slk->ent[i].ent_text = (char *) _nc_doalloc(0, used);
if (SP_PARM->_slk->ent[i].ent_text == 0)
- memset(SP_PARM->_slk->ent[i].form_text, ' ', used - 1);
- SP_PARM->_slk->ent[i].form_text[used] = '\0';
+ if (used > 1) {
+ memset(SP_PARM->_slk->ent[i].form_text, ' ', used - 1);
+ }
+ SP_PARM->_slk->ent[i].form_text[used - 1] = '\0';