Skip to content

Commit

Permalink
fix type_str check
Browse files Browse the repository at this point in the history
  • Loading branch information
gsauthof committed Jul 18, 2013
1 parent 3335964 commit 11f157f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prettyprint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 11f157f

Please sign in to comment.