X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=parser.c;h=1d1840386568caca9923556c34de79acb0f1c2a4;hb=ebd7f78161504e46896f7d96bb41e29714b2fd53;hp=471ae94101f769b32d58a12e3cb03228224c4b90;hpb=ff23924264802924788f2a15c73a8d058e90432e;p=xboard.git diff --git a/parser.c b/parser.c index 471ae94..1d18403 100644 --- a/parser.c +++ b/parser.c @@ -1,7 +1,7 @@ /* * parser.c -- * - * Copyright 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. + * Copyright 2011, 2012, 2013, 2014, 2015, 2016 Free Software Foundation, Inc. * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -381,6 +381,7 @@ char PromoSuffix (char **p) { char *start = *p; + if(**p == ' ') return NULLCHAR; // common case, test explicitly for speed if(**p == 'e' && (Match("ep", p) || Match("e.p.", p))) { *p = start; return NULLCHAR; } // non-compliant e.p. suffix is no promoChar! if(**p == '+' && IS_SHOGI(gameInfo.variant)) { (*p)++; return '+'; } if(**p == '=' || (gameInfo.variant == VariantSChess) && **p == '/') (*p)++; // optional = (or / for Seirawan gating)