# HG changeset patch # User John "Elwin" Edwards # Date 1395943770 25200 # Node ID aa582a02eb5d42fd08acee096954a8b17281b29f # Parent ee250e3646fd6cb4bd34637acccc6587185a7ae4 srogue: remove unnecessary pointer cast. Casting char* to int before a comparison doesn't alter the result, and isn't safe if sizeof(char *) != sizeof(int). diff -r ee250e3646fd -r aa582a02eb5d srogue/options.c --- a/srogue/options.c Sun Mar 23 21:27:14 2014 -0700 +++ b/srogue/options.c Thu Mar 27 11:09:30 2014 -0700 @@ -124,7 +124,7 @@ */ for (sp = buf; (c=readchar(awin)) != '\n' && c != '\r' && c != ESCAPE; wclrtoeol(awin), draw(awin)) { - if (( (int)sp - (int)buf ) >= 50) { + if (sp - buf >= 50) { *sp = '\0'; /* line was too long */ strucpy(opt,buf,strlen(buf)); mvwaddstr(awin, 0, 0, "Name was truncated --More--");