From 5524bd0e14ad60a83b66f02feff9eb7e1697cba6 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Fri, 16 Sep 2016 14:51:51 +0200 Subject: [PATCH] Print address of failed function --- test/testpaint/intercept.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/testpaint/intercept.c b/test/testpaint/intercept.c index d40824116a..c4b447e2cf 100644 --- a/test/testpaint/intercept.c +++ b/test/testpaint/intercept.c @@ -531,6 +531,8 @@ static bool testTrackElement(uint8 rideType, uint8 trackType, utf8string *error) int height = 48; + sprintf(*error, "rct2: 0x%08X\n", RideTypeTrackPaintFunctionsOld[rideType][trackType]); + TRACK_PAINT_FUNCTION_GETTER newPaintGetter = RideTypeTrackPaintFunctions[rideType]; int sequenceCount = getTrackSequenceCount(rideType, trackType); for (int currentRotation = 0; currentRotation < 4; currentRotation++) { @@ -585,9 +587,9 @@ static bool testTrackElement(uint8 rideType, uint8 trackType, utf8string *error) sprintf(diff + strlen(diff), ">>> ACTUAL\n"); if (oldCallCount != newCallCount) { - sprintf(*error, "Call counts don't match (was %d, expected %d) [direction:%d trackSequence:%d]", newCallCount, oldCallCount, direction, trackSequence); + sprintf(*error + strlen(*error), "Call counts don't match (was %d, expected %d) [direction:%d trackSequence:%d]", newCallCount, oldCallCount, direction, trackSequence); } else { - sprintf(*error, "Calls don't match [direction:%d trackSequence:%d]", direction, trackSequence); + sprintf(*error + strlen(*error), "Calls don't match [direction:%d trackSequence:%d]", direction, trackSequence); } sprintf(*error + strlen(*error), "\n%s", diff); @@ -601,7 +603,7 @@ static bool testTrackElement(uint8 rideType, uint8 trackType, utf8string *error) } } - sprintf(*error, ""); + sprintf(*error + strlen(*error), ""); bool segmentSuccess = testSupportSegments(rideType, trackType); if (!segmentSuccess) {