Skip to content
Snippets Groups Projects
Commit 193dfbea authored by deuce's avatar deuce
Browse files

Instead of beating the code with typecasts, express the operations the

"right" way.
parent 51be822b
No related branches found
No related tags found
No related merge requests found
......@@ -1537,9 +1537,9 @@ js_html_encode(JSContext *cx, uintN argc, jsval *arglist)
j--;
break;
default:
if(((uchar)inbuf[i])&0x80) {
if(inbuf[i]&0x80) {
if(exascii) {
ch=((uchar)inbuf[i])^0x80;
ch=inbuf[i]^'\x80';
if(exasctbl[ch].name!=NULL)
j+=sprintf(tmpbuf+j,"&%s;",exasctbl[ch].name);
else
......
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