Skip to content
Snippets Groups Projects
Commit eae38bd3 authored by rswindell's avatar rswindell
Browse files

Avoid stupid MSVC10 assertiions if isdigit() is passed a negative value.

parent 1cb57575
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,7 @@ int sbbs_t::exec_msg(csi_t *csi)
if(usrgrps && (ch&0xf)*10U<=usrsubs[curgrp] && (ch&0xf)) {
i=(ch&0xf)*10;
ch=getkey(K_UPPER);
if(!isdigit(ch) && ch!=CR) {
if(!isdigit((uchar)ch) && ch!=CR) {
ungetkey(ch);
cursub[curgrp]=(i/10)-1;
return(0);
......@@ -141,7 +141,7 @@ int sbbs_t::exec_msg(csi_t *csi)
if(i*10<=usrsubs[curgrp]) { /* 100+ subs */
i*=10;
ch=getkey(K_UPPER);
if(!isdigit(ch) && ch!=CR) {
if(!isdigit((uchar)ch) && ch!=CR) {
ungetkey(ch);
cursub[curgrp]=(i/10)-1;
return(0);
......@@ -176,7 +176,7 @@ int sbbs_t::exec_msg(csi_t *csi)
if((ch&0xf)*10U<=usrgrps && (ch&0xf)) {
i=(ch&0xf)*10;
ch=getkey(K_UPPER);
if(!isdigit(ch) && ch!=CR) {
if(!isdigit((uchar)ch) && ch!=CR) {
ungetkey(ch);
curgrp=(i/10)-1;
return(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment