fix for crash: Ticket 954

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6406 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 366b9a596782bed07f336f6aa9dbd2049b9676a4
Former-commit-id: d47fc9936158cbdb7fa94a025f352dda15eae2f3
This commit is contained in:
beaglejoe 2016-05-10 18:03:39 +00:00
parent 5c64ce2e8a
commit b39119dffc

View file

@ -276,9 +276,9 @@ GfctrlGetNameByRef(int type, int index)
return GfKey[i].descr;
}
}
if (isprint(index)) {
sprintf(buf, "%c", index);
return buf;
if(index > 0 && index < 128 && isprint(index & 0x7F)) {
sprintf(buf, "%c", index & 0x7F);
return buf;
}
return NULL;
break;