X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=19b69af10e458836f1e1a68563a9d8608c31682c;hb=fcf1b04ac104178d84c30b2824804f199061e250;hp=0216d64061020920ab439b46be8a21c46ae5e2c3;hpb=29d4b054a804a2826b60e2777cd111dde1aac79f;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 0216d64..19b69af 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1607,10 +1607,10 @@ static Option shuffleOptions[] = { static void SetRandom (int n) { - int r = n==2 ? -1 : random() & (1<<30)-1; + int r = n==3 ? -1 : random() & (1<<30)-1; char buf[MSG_SIZ]; snprintf(buf, MSG_SIZ, "%d", r); - SetWidgetText(&shuffleOptions[1], buf, TransientDlg); + SetWidgetText(&shuffleOptions[2], buf, TransientDlg); SetWidgetState(&shuffleOptions[0], True); } @@ -2484,8 +2484,8 @@ GetHelpText (FILE *f, char *name) while(buf[--len] == ' ') buf[len] = NULLCHAR; snprintf(title, MSG_SIZ, "Help on '%s'", buf+3); while((line = ReadLine(f))) { - if(!strncmp(line, buf, len) || !strncmp(line, ".SS ", 4) && !strncmp(line+4, buf+3, len-3) - || !strncmp(line, ".IX Item \"", 10) && !strncmp(line+10, buf+3, len-3)) { + if(!strncmp(line, buf, ++len) || !strncmp(line, ".SS ", 4) && !strncmp(line+4, buf+3, len-3) + || !strncmp(line, ".IX Item \"", 10) && !strncmp(line+10, buf+3, len-3)) { while((line = ReadLine(f)) && (cnt == 0 || strncmp(line, ".B ", 3) && strncmp(line, ".SS ", 4) && strncmp(line, ".IX ", 4))) { if(!*line) { *p++ = '\n'; *p++ = '\n'; q = p; continue; } if(*line == '.') continue;