mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Remove extraneous underscores at start and end of Rectangles seeds.
[originally from svn r4473]
This commit is contained in:
8
rect.c
8
rect.c
@ -881,7 +881,13 @@ char *new_game_seed(game_params *params, random_state *rs)
|
|||||||
run -= c - ('a' - 1);
|
run -= c - ('a' - 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
*p++ = '_';
|
/*
|
||||||
|
* If there's a number in the very top left or
|
||||||
|
* bottom right, there's no point putting an
|
||||||
|
* unnecessary _ before or after it.
|
||||||
|
*/
|
||||||
|
if (p > seed && n > 0)
|
||||||
|
*p++ = '_';
|
||||||
}
|
}
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
p += sprintf(p, "%d", n);
|
p += sprintf(p, "%d", n);
|
||||||
|
Reference in New Issue
Block a user