From 1c981604a13a7c6718bbe453a2f76bfa091cc024 Mon Sep 17 00:00:00 2001 From: James Fraser Date: Fri, 16 Nov 2018 20:25:10 +1100 Subject: [PATCH] Fixed erroneous change. --- fakegen.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fakegen.rb b/fakegen.rb index 3382f17..aa784f2 100644 --- a/fakegen.rb +++ b/fakegen.rb @@ -476,13 +476,17 @@ def define_fff_globals putd "FFF_END_EXTERN_C" } puts - putd "#define FFF_RESET_HISTORY() fff.call_history_idx = 0;" + putd_backslash "#define FFF_RESET_HISTORY()" + indent { + putd_backslash "fff.call_history_idx = 0;" + putd "memset(fff.call_history, 0, sizeof(fff.call_history));" + } puts putd_backslash "#define REGISTER_CALL(function)" indent { putd_backslash "if(fff.call_history_idx < FFF_CALL_HISTORY_LEN)" indent { - putd "fff.call_history[fff.call_history_idx++] = (fff_function_t)function;" + putd "fff.call_history[fff.call_history_idx++] = (fff_function_t)function;" } } end