diff --git a/server/core/modutil.c b/server/core/modutil.c index ae0c5531a..a0afb5622 100644 --- a/server/core/modutil.c +++ b/server/core/modutil.c @@ -837,7 +837,11 @@ int modutil_count_statements(GWBUF* buffer) ptr++; } - if(*(end - 1) == ';') + ptr = end - 1; + while(isspace(*ptr)) + ptr--; + + if(*ptr == ';') { num--; }