From 11f157f1104a25b0b8193431c185fd62146aac5e Mon Sep 17 00:00:00 2001 From: Georg Sauthoff Date: Thu, 18 Jul 2013 22:53:24 +0200 Subject: [PATCH] fix type_str check --- prettyprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prettyprint.c b/prettyprint.c index c2fa781..30bb7df 100644 --- a/prettyprint.c +++ b/prettyprint.c @@ -182,7 +182,7 @@ int pp_sql(const Statement *stmt, void *user_ptr) tprintf("-- %s:%zu\n", stmt->filename, stmt->line_number); if (!stmt->text) { - if (stmt->type_str && *stmt->type_str == '0') + if (!stmt->type_str || *stmt->type_str == '0') tprintf("-- Unknown SQL statement type: %d\n", stmt->type); else tprintf("-- Pseudo-SQL: %s\n", stmt->type_str);