Commit graph

1486 commits

Author SHA1 Message Date
NHOrus
96ead306b5 Prevent RNG overflow.
Pass save under validation by pointer, so we could mess with underlying
values a little. Only thing I feel we can safely and sanely modify.
2017-09-05 18:20:21 +03:00
NHOrus
0dd40bba32 Removed old copy-paste error
Put numdie bounds check in croak to prevent OOB access on negative
numdie while preserving tests
2017-09-05 17:46:38 +03:00
NHOrus
e5a0c6e2b7 Prevent tampering with PRNG parameters in save 2017-08-24 14:48:02 +03:00
NHOrus
917af2e744 Fixed copy-paste errors 2017-08-24 14:41:21 +03:00
NHOrus
17d94c46cd Prevent division by zero 2017-08-24 14:25:29 +03:00
NHOrus
25424a01db Verify bounds for linked lists 2017-08-24 13:47:57 +03:00
NHOrus
5e39abf730 Corrected limit for atloc, see init.c for filling double-linked list 2017-08-24 13:40:10 +03:00
NHOrus
aeaa0400cb Fix value, add check for linked locations 2017-08-24 13:02:51 +03:00
NHOrus
98b21323a6 Bounds check for properties; it is not violated in normal game 2017-08-24 11:21:10 +03:00
NHOrus
f496bff945 Syntax error 2017-08-13 15:58:35 +01:00
NHOrus
ad9c53abdb Validate dwarves and tally 2017-08-13 15:56:37 +01:00
NHOrus
0fbd79b608 Reindentation 2017-08-13 15:56:07 +01:00
NHOrus
f0dc3d3b7c Verify sanity of location arrays 2017-08-13 15:16:09 +01:00
NHOrus
36f72f1902 Validating sanity of locations in restored game 2017-08-13 15:13:20 +01:00
NHOrus
7ad7dd209e Remove extraneous listing of files 2017-08-13 12:14:09 +01:00
Eric S. Raymond
2d575dd0e3 Ready for 1.4 release. 2017-08-07 23:21:10 -04:00
Eric S. Raymond
cf92b9d9d6 Remove duplicative phase code. 2017-08-03 15:51:39 -04:00
Jason S. Ninneman
26bf324e07 Use the '=' operator (not memcpy()) to shallow-copy structs. 2017-08-03 12:41:35 -07:00
Eric S. Raymond
87c6d3fb1e Canonicalize OV commands to VO form.
Allows us to get rid of some obscure logic that causes an unnecessary
word shift. One error message changes in a benign way.
2017-08-03 15:02:41 -04:00
Eric S. Raymond
cfa37c83a7 Massage "{oil|water} {plant|door} into equivalent pourcommand.
Bedfore this change the command was passed in OV form, which we want
to get rid of.
2017-08-03 14:48:44 -04:00
Eric S. Raymond
0468da2cdf Simplify overcomplicated code. 2017-08-03 14:22:38 -04:00
Eric S. Raymond
2d618410b8 More breadcrumb improvements. 2017-08-03 12:56:50 -04:00
Eric S. Raymond
8b1533db1a Improve debugging. 2017-08-03 12:25:56 -04:00
Jason S. Ninneman
24d102781c Typedefify command_t; simplify code accordingly. 2017-08-03 08:29:46 -07:00
Jason S. Ninneman
5c30d6429f Simplify command word handling. 2017-08-03 08:24:18 -07:00
Jason S. Ninneman
23ae7edb10 Upgrade get_vocab_metadata() to use command_type_t. 2017-08-03 08:24:18 -07:00
Jason S. Ninneman
5c91ea3739 Encapsulate command words into their own struct. 2017-08-03 08:24:18 -07:00
Jason S. Ninneman
a15e7c9f91 Add command_word_t, for command words. 2017-08-03 08:16:19 -07:00
Jason S. Ninneman
0d3393ebee Datatype definition for command word types. 2017-08-03 08:16:19 -07:00
Eric S. Raymond
1966264715 Cope with YAML idiosyncracy at unquoted "YES". 2017-08-03 10:54:33 -04:00
Eric S. Raymond
812d0194bb Add breadcrumbs for grammar debugging. 2017-08-03 10:54:33 -04:00
Jason S. Ninneman
2ae60b85d1 Add INSTALL.adoc and templates/*.tpl to make recipes.
Fixes issues #38 and #39.
2017-08-02 14:01:39 -07:00
Eric S. Raymond
35ae4af6da Ready for 1.3 release. 2017-08-01 20:03:17 -04:00
Eric S. Raymond
06c8c97738 Exclude %V from coverage since we removed it from the test suite. 2017-08-01 19:55:34 -04:00
Eric S. Raymond
6c7e5a3ac1 Remove 'version test...
...it's too much of a PITA to edit the check file after every release bump.
2017-08-01 19:45:55 -04:00
Eric S. Raymond
25e6b11fd0 Add regression test for split commands. 2017-08-01 19:40:28 -04:00
Eric S. Raymond
a00229050a Remove unused phase codes. 2017-08-01 19:26:29 -04:00
Eric S. Raymond
fd4e3aea6a Address GitLab issue #36: "Get what?" prompt incorrectly handled 2017-08-01 18:37:58 -04:00
Eric S. Raymond
878efdddfb Remove unnecessary clearing of command verb. 2017-07-31 17:40:25 -04:00
Eric S. Raymond
e50f1b8a7b Coverage repair. 2017-07-31 15:26:56 -04:00
Eric S. Raymond
5d6b3aaf62 Fix a coverage gap. 2017-07-31 14:59:58 -04:00
Aaron Traas
319c5830c8 Moved dungeon.c and dungeon.h templates into external files.
Also refactored to use named vars in the templates, so it's easier to
refactor, as order when you call .format() isn't important.
2017-07-23 12:15:25 -04:00
Aaron Traas
8765f49fdc Address Gitlab issue #35 2017-07-22 14:41:23 -04:00
Aaron Traas
ca5374edc3 Modified action() to take take a copy of command rather than a pointer.
It should be safer now that we're not scribbling all over command in
action(), as it's closer to pure. Also fixed a bug in say.
2017-07-21 18:27:02 -04:00
Aaron Traas
30f13c6c25 Back up to 100% coverage. 2017-07-21 17:22:03 -04:00
Aaron Traas
e8a627f964 Specials excised from adventure.yaml 2017-07-21 17:15:23 -04:00
Aaron Traas
5f28f95244 All specials are now actions. Builds correct outputs, more needs deleting. 2017-07-21 16:56:43 -04:00
Eric S. Raymond
80b2b9b356 Simplify seed and waste cpmands using %d in the YAML string. 2017-07-21 14:03:39 -04:00
Aaron Traas
5337e00725 Fix to Gitlab issue #32. Now SEED and WASTE are in adventure.yaml
NOTE: the tests are all updated because now, like every other action,
SEED and WASTE have a \n before their output, as they correctly use
SPEAK
2017-07-21 10:23:02 -04:00
Eric S. Raymond
ef236aea3b More type hygiene. 2017-07-21 07:44:09 -04:00