Sanity check bug fixes and improvements.

This commit is contained in:
claudiol 2015-08-21 16:59:01 -04:00
parent ea56c40062
commit c7e6a6c584
4 changed files with 7 additions and 3 deletions

View file

@ -160,6 +160,7 @@ const int keyMap[] = {
Qt::Key_Backspace, 1, Qt::Key_Backspace, 1,
Qt::Key_U, 2, Qt::Key_U, 2,
Qt::Key_Slash, 3, Qt::Key_Slash, 3,
Qt::Key_Z, 3,
Qt::Key_Asterisk, 4, Qt::Key_Asterisk, 4,
Qt::Key_Minus, 5, Qt::Key_Minus, 5,
Qt::Key_Plus, 6, Qt::Key_Plus, 6,

View file

@ -97,11 +97,14 @@ SOURCES +=\
newrpl/lib-twenty-lam.c \ newrpl/lib-twenty-lam.c \
newrpl/lib-two-ident.c \ newrpl/lib-two-ident.c \
newrpl/lists.c \ newrpl/lists.c \
newrpl/matrix.c \
newrpl/returnstack.c \ newrpl/returnstack.c \
newrpl/romlibs.c \ newrpl/romlibs.c \
newrpl/runstream.c \ newrpl/runstream.c \
newrpl/symbolic.c \ newrpl/symbolic.c \
newrpl/tempob.c \ newrpl/tempob.c \
newrpl/backup.c \
newrpl/sanity.c \
firmware/ui_cmdline.c \ firmware/ui_cmdline.c \
newrpl/lib-48-matrix.c \ newrpl/lib-48-matrix.c \
newrpl/utf8lib.c \ newrpl/utf8lib.c \
@ -109,7 +112,6 @@ SOURCES +=\
firmware/sys/Font6A.c \ firmware/sys/Font6A.c \
firmware/sys/Font5C.c \ firmware/sys/Font5C.c \
firmware/sys/Font7A.c \ firmware/sys/Font7A.c \
newrpl/matrix.c \
firmware/sys/Font8C.c \ firmware/sys/Font8C.c \
firmware/sys/Font8D.c firmware/sys/Font8D.c

View file

@ -1322,7 +1322,7 @@ void LIB_HANDLER()
if(!usedbytes) { RetNum=ERR_INVALID; return; } // IDENT HAS AN EXTRA WORD if(!usedbytes) { RetNum=ERR_INVALID; return; } // IDENT HAS AN EXTRA WORD
// AND CHECK FOR NAME VALIDITY // AND CHECK FOR NAME VALIDITY
if(!rplIsValidIdent((BYTEPTR)(ObjectPTR+1),((BYTEPTR)ObjectPTR)+((len-1)<<2)+usedbytes)) { RetNum=ERR_INVALID; return; } if(!rplIsValidIdent((BYTEPTR)(ObjectPTR+1),((BYTEPTR)ObjectPTR)+(len<<2)+usedbytes)) { RetNum=ERR_INVALID; return; }
} }
RetNum=OK_CONTINUE; RetNum=OK_CONTINUE;
return; return;

View file

@ -445,9 +445,10 @@ else {
// IF CONTENTS ARE A DIRECTORY HANDLE, CHECK IF THE HANDLE IS VALID // IF CONTENTS ARE A DIRECTORY HANDLE, CHECK IF THE HANDLE IS VALID
if(ISDIR(*dirptr[1])) { if(ISDIR(*dirptr[1])) {
if(!rplFindDirbyHandle(*dirptr[1])) { if(!rplFindDirbyHandle(dirptr[1])) {
// THIS IS AN INVALID ENTRY TO A NON-EXISTENT OR CORRUPTED DIRECTORY OBJECT // THIS IS AN INVALID ENTRY TO A NON-EXISTENT OR CORRUPTED DIRECTORY OBJECT
// JUST PURGE IT // JUST PURGE IT
if(!fix) return 0;
rplPurgeForced(dirptr); rplPurgeForced(dirptr);
continue; continue;
} }