aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/gamedb.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/gamedb.c')
-rw-r--r--FICS/gamedb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c
index 530eb47..572abf5 100644
--- a/FICS/gamedb.c
+++ b/FICS/gamedb.c
@@ -886,7 +886,8 @@ WriteMoves(FILE *fp, move_t *m)
/* Are we using from-file or from-rank in 'algString'? */
- i = strlen(m->algString) - 1;
+ if ((i = strlen(m->algString)) > 0)
+ i -= 1;
if (m->algString[i] == '+') {
check = 1;