Commit Graph

726 Commits

Author SHA1 Message Date
Enno Rehling f69311b141 Merge branch 'develop' of github.com:eressea/server into develop 2015-11-11 15:15:30 +01:00
Enno Rehling 4eb4ff40ac https://bugs.eressea.de/view.php?id=2155
monsters do not attack units inside a castle or watch
dragons do not attack guards
2015-11-11 14:36:56 +01:00
Enno Rehling e14cc50252 CID 22522, 22520 Resource leak
helping coverity scan to understand this code
2015-11-09 20:05:55 +01:00
Enno Rehling ea8721367a test and fix shock trigger.
https://bugs.eressea.de/view.php?id=2154
2015-11-09 19:43:51 +01:00
Enno Rehling 28781dfcc8 Merge pull request #378 from ennorehling/develop
spells are allowed to have 0 hp
2015-11-09 16:45:08 +01:00
Enno Rehling 4790950daf spells are allowed to have 0 hp
https://bugs.eressea.de/view.php?id=2150
2015-11-09 16:39:30 +01:00
Enno Rehling e9ed30f9db Merge pull request #377 from ennorehling/develop
Bug 2152: Parteitarnung
2015-11-09 16:30:57 +01:00
Enno Rehling 6d0bcb246d fix compilation and setting parameters to null 2015-11-09 13:55:09 +01:00
Enno Rehling ee02721c21 fix and tests for otherfaction attributes in E2
https://bugs.eressea.de/view.php?id=2152
2015-11-09 13:36:52 +01:00
Enno Rehling bf8cc4cb08 trying to trace down an intermittently failing test on windows 2015-11-08 10:34:43 +01:00
Enno Rehling 318820fb00 eliminate use of test_create_world 2015-11-07 23:49:45 +01:00
Enno Rehling 43ab9e3304 Merge pull request #372 from TurnerSE/bug/#1859
Scheint ja zu funktionieren? Wenn etwas anderes kaputt geht, dann hat das nicht genug Tests, das ist auch eine Lehre. Und noch ist ja Zeit zum Release, um das zu merken.
2015-11-07 19:21:16 +01:00
Enno Rehling 26b6ae4e30 github issue #374
stick some assertions in natural_armor
refactor it for readability
eliminate a static memory leak
reset num_races to zero at end of test
2015-11-07 18:21:47 +01:00
Enno Rehling 2f8dc29396 clean up item tests so they don't use test_create_world
fix intermittent skillpotion test
2015-11-07 13:52:18 +01:00
Philipp Dreher 663d947b2a New behaviour in case of low skill during building
Insufficient skill after hitting the next improvement stage is now
handled by leaving the for-loop and skipping to after-build-processing.
2015-11-06 21:04:35 +01:00
Philipp Dreher b0a986e155 Revert "added a lua-test"
This reverts commit a452ad1517.
2015-11-06 20:57:19 +01:00
Philipp Dreher a452ad1517 added a lua-test
New lua-test for the bug concerning the minskill for castle-stages.
(#1859)
2015-11-06 20:53:10 +01:00
Philipp Dreher be5d81acd1 Revert "new test"
This reverts commit cb16315e7c.
2015-11-06 20:51:38 +01:00
Philipp Dreher cb16315e7c new test
Added test for the handling of castles' buildstages and their individual
skillcaps.
2015-11-06 13:14:19 +01:00
Enno Rehling 8a057f183f CID 22580 Time of check time of use
no need to check this first
2015-11-05 13:22:51 +01:00
Enno Rehling 797eee025d fix cb_insert comparison (new return value for success) 2015-11-05 13:01:48 +01:00
Enno Rehling 2a7fc87656 CID 30742 Dereference before null check
CID 30741 ditto
2015-11-05 10:59:14 +01:00
Enno Rehling b81e56d306 CID 22486 Dereference after null check 2015-11-05 08:32:21 +01:00
Enno Rehling b6190b5193 CID 22527 Resource leak 2015-11-04 19:20:34 +01:00
Enno Rehling 8ab4784e3f Merge branch 'coverity-scan' of https://github.com/ennorehling/eressea into ennorehling-coverity-scan
Conflicts:
	src/kernel/jsonconf.c
	src/kernel/save.h
	src/names.c
2015-11-04 12:44:45 +01:00
Enno Rehling 8bc44d82ed CID 22500 Argument cannot be negative 2015-11-04 12:29:51 +01:00
Enno Rehling 5887e8e48f CID 22434 Ignoring number of bytes read 2015-11-04 12:19:16 +01:00
Enno Rehling 47f678d2a3 CID 22436 Ignoring number of bytes read, github issue #333 2015-11-04 11:51:19 +01:00
Enno Rehling 731dac3363 CID 22437 Unchecked return value from library
github issue #332
2015-11-04 11:45:13 +01:00
Enno Rehling d4ff807c20 Merge pull request #364 from ennorehling/coverity-fixes
several smaller coverity fixes
2015-11-04 11:04:32 +01:00
Enno Rehling 024e4c45ca fix a bug introduced by f78fe842 (CID 22443) 2015-11-04 10:40:53 +01:00
Enno Rehling c57668e6ee failing test for newly discovered storage problems 2015-11-04 09:48:51 +01:00
Enno Rehling 04b5bc0c60 CID 22474 Evaluation order violation 2015-11-03 23:19:35 +01:00
Enno Rehling 1093a23d5a CID 22464 Division or modulo by zero 2015-11-03 23:14:06 +01:00
Enno Rehling 876e4122b1 CID 22463 Division or modulo by zero 2015-11-03 23:13:04 +01:00
Enno Rehling 307c5ec85b CID 22435 Unchecked return value from library 2015-11-03 22:56:05 +01:00
Enno Rehling 0c5ef21c10 CID 22434 Ignoring number of bytes read
also potential missing  null-termination
2015-11-03 22:53:19 +01:00
Enno Rehling f959f43f1e extensive tests for armor calculation 2015-11-03 18:59:09 +01:00
Enno Rehling 91a6324a97 cleanup: functions do not need to be dereferenced with an & in C. 2015-11-03 13:30:34 +01:00
Enno Rehling 7e81b98fa4 Merge pull request #339 from TurnerSE/improvement/CID22481
Improvement/cid22481
2015-11-03 13:08:03 +01:00
Philipp Dreher 07fd3dc970 formal correction 2015-11-02 18:06:19 +01:00
Enno Rehling 072bfd3912 testin building_is_active
testing multiple units in one building
2015-11-02 15:06:30 +01:00
Enno Rehling 4bf2509fb3 test inside_building vs. overflow
fix default building capacity (should be 1 per size)
2015-11-02 14:56:58 +01:00
Enno Rehling 42ae086def unit is inisde a building also when it was not paid for 2015-11-02 14:49:48 +01:00
Enno Rehling 24ff4c301d refactor: separate building_is_active from inside_building 2015-11-02 14:18:50 +01:00
Philipp Dreher b107ddadf5 added assert to check the faction-pointer 2015-11-01 21:43:18 +01:00
Philipp Dreher 491e5faed9 Revert "general check for sf->faction's validity"
This reverts commit f18b5ea7d2.
2015-11-01 21:40:06 +01:00
Philipp Dreher f18b5ea7d2 general check for sf->faction's validity
The handling of an ally without a valid faction-pointer is now skipped
in favor of a logged error.
2015-11-01 18:54:29 +01:00
Enno Rehling 21a2313e2a CID 22517: Parse warning (PW.PARAM_SET_BUT_NOT_USED) 2015-10-30 15:20:06 +01:00
Enno Rehling e7ca5345d7 CID 22509: Dereference null return value (NULL_RETURNS)
potential problems at the edge of the map.
2015-10-30 12:57:07 +01:00
Enno Rehling e1eb5098d4 CID 22554: Improper use of negative value (REVERSE_NEGATIVE)
I believe this was a false positive, but more asserts can never hurt.
2015-10-30 12:40:48 +01:00
Enno Rehling 93b7bacff5 CID 22552: Dereference before null check (REVERSE_INULL) 2015-10-30 12:37:27 +01:00
Enno Rehling 5d273e475e CID 22558: Copy into fixed size buffer (STRING_OVERFLOW)
bsdstring buffer size check
2015-10-30 11:41:59 +01:00
Enno Rehling 1fb04179dc CID 22557: Copy into fixed size buffer (STRING_OVERFLOW)
eliminate code duplication. bsdstring is better than libc strings.
2015-10-30 11:39:47 +01:00
Enno Rehling 4eb6a89821 CID 26262: short and unsigned types are the devil, use int everywhere for fewer headaches 2015-10-29 20:39:44 +01:00
Enno Rehling 4f25831407 coverity scan CID 22576: arguments in wrong order
I believe that was a false positive, and will try to aquelch it by naming the arguments better.
2015-10-29 11:24:01 +01:00
Enno Rehling 976b6aaea1 coverity CID 22593: write to pointer after free
github issue #324
use free_land where we need it.
2015-10-29 11:17:31 +01:00
Enno Rehling c298b7fd74 coverity CID 22501 imroper use of negative value
explicitly use SK_MAGIC instead of a lookup. Faster, easier to reason about.
2015-10-29 11:06:25 +01:00
Enno Rehling 8675002e68 coverity scan CIDs 22540 22541 22546: resource leak
the calendar should only ever be initialized once, but based on static analysis, I agree that this was sloppy.
2015-10-29 09:56:53 +01:00
Enno Rehling 2372d3aacd coverity scan CID 22516: out-of-bounds write
potentially a bug with bad XML files? only matters if we have those, but we shouldn't
2015-10-29 09:49:26 +01:00
Enno Rehling 8b92003fff coverity scan CID 22487: dereference after null check
we don't use many differnt calendars, so this has never happened.
2015-10-29 09:43:51 +01:00
Enno Rehling 70d4a6af03 coverity scan CID 22553: dereference before null check 2015-10-29 09:06:50 +01:00
Enno Rehling f2b0ba1ec6 eliminate find_spell warning for games where nobody is cursed, and you cannot summon igjarjuk 2015-10-27 12:40:03 +01:00
Enno Rehling 47e925473e always use a macro, not magical constants 2015-10-15 08:40:52 +02:00
Enno Rehling c9e7a76d9b minor leak: release memory held by curse_type structures 2015-10-15 08:38:43 +02:00
Enno Rehling d4655ee88a leak: do not create new message_type objects in test_cleanup 2015-10-15 08:29:20 +02:00
Enno Rehling 467ce2a719 visual studio compilation fix 2015-10-14 22:09:11 +02:00
Enno Rehling ef1a2dfc4f fixed a crash 2015-10-14 22:06:40 +02:00
Enno Rehling 3200dd2dc8 leak: free locale_data 2015-10-14 21:51:43 +02:00
Enno Rehling b5455531e7 do not leak terrain.herbs 2015-10-14 21:37:27 +02:00
Enno Rehling c04bda102b call free_order for each remaining reference 2015-10-14 20:56:09 +02:00
Enno Rehling a3b27ad6d2 leak: remember to call test_cleanup 2015-10-14 20:49:30 +02:00
Enno Rehling 03ff8f612d leaks: remember to call test_cleanup 2015-10-14 20:48:01 +02:00
Enno Rehling 284a74c878 leak: deleting a config entry did not free its name 2015-10-14 20:45:43 +02:00
Enno Rehling f740f2829a leak: in tests, when correct message_type doesn't exist, arguments should not leak 2015-10-14 20:41:42 +02:00
Enno Rehling 144aeb23ac leaks: call cleanup, free triggers 2015-10-14 20:29:07 +02:00
Enno Rehling 5018bbb0c0 correctly release messages created in test_merge_split 2015-10-14 20:21:38 +02:00
Enno Rehling 2abdba9e8a refactor free_messagelist, fix leak in test_merge_split 2015-10-14 14:08:50 +02:00
Enno Rehling 1c2922aafa leak: spell names and other strings need to be released. 2015-10-14 13:58:55 +02:00
Enno Rehling 254cda86e8 short commands speedup wasn't working (never got assigned) 2015-10-14 13:20:27 +02:00
Enno Rehling 4fc5ac7740 there is a memory leak in test_long_order_hungry, but the root cause lies deeper 2015-10-14 12:51:45 +02:00
Enno Rehling bdf4834dc2 leak: region_owner data was never released 2015-10-14 12:22:37 +02:00
Enno Rehling ae3210ec87 pervious commit did not compile: small copy/paste error 2015-10-14 12:14:33 +02:00
Enno Rehling 2c659c1f47 memory leak: free building maintenance data 2015-10-14 12:13:05 +02:00
Enno Rehling 3cfb22876b memory leak: free params after test 2015-10-14 12:01:33 +02:00
Enno Rehling f0671aafda leak: some tests were leaking seen_factions becaus they don't call destroyfaction or render reports 2015-10-13 23:33:11 +02:00
Enno Rehling a3210aaed7 leak: free per-locale cached order data (has additional refcount) 2015-10-13 23:25:44 +02:00
Enno Rehling 377b0d0305 leak: teardown build tests, free construction data 2015-10-13 23:09:50 +02:00
Enno Rehling a6ca489d9a free multi-level construction correctly, avoid duplication 2015-10-13 22:56:16 +02:00
Enno Rehling 26f5b592bd leak: free construction materials 2015-10-13 22:41:54 +02:00
Enno Rehling 457465b4a2 memory leak: free message_list objects 2015-10-13 22:37:45 +02:00
Enno Rehling 333c27403f memory leaks: ship_type.construction, give_cmd return values 2015-10-13 22:34:22 +02:00
Enno Rehling c70d987c09 memory leak: free weapon data 2015-10-13 22:27:43 +02:00
Enno Rehling 0facb386a8 memory leaks: call test_cleanup, free strlist, free message 2015-10-13 22:21:05 +02:00
Enno Rehling d264c454b8 memory leak: building_type::construction was never released 2015-10-13 22:13:50 +02:00
Enno Rehling 7e9c36b599 memory leak: free spell components and spells at exit 2015-10-13 22:02:58 +02:00
Enno Rehling 67135c8ea3 avoid triggering null-pointer assert 2015-10-13 21:50:23 +02:00
Enno Rehling 2f35246f8c memory leak: when freeing factions, also free their spellbooks 2015-10-13 21:47:45 +02:00
Enno Rehling 3741a19437 prevent memory leak of cJSON structures in tests 2015-10-13 21:21:31 +02:00
Enno Rehling 7854684d8b fix memory leaks in all tests that create an order without calling free_order at the end. 2015-10-13 15:45:38 +02:00