mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Untangle: forbid descriptions that connect a node to itself
These cause an assertion failure in new_game(), so they should be rejected by validate_desc().
This commit is contained in:
@ -755,6 +755,8 @@ static const char *validate_desc(const game_params *params, const char *desc)
|
|||||||
return "Expected ',' after number in game description";
|
return "Expected ',' after number in game description";
|
||||||
desc++; /* eat comma */
|
desc++; /* eat comma */
|
||||||
}
|
}
|
||||||
|
if (a == b)
|
||||||
|
return "Node linked to itself in game description";
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user