1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

Die on EOF() method mismatch

perl_vt_Eof() in dbdimp_virtual_table.inc calls EOF() method. If the
call returned an unexpected number of values, perl_vt_Eof() printed
a warning and returned a value of a local variable that was never
initialized.

This patch fixes it by raising an exception instead of printing
a warning.
This commit is contained in:
Petr Písař 2019-07-30 10:10:21 +02:00
parent 64e4c9d299
commit 7d8deadc78

View file

@ -496,8 +496,7 @@ static int perl_vt_Eof(sqlite3_vtab_cursor *pVtabCursor){
count = call_method ("EOF", G_SCALAR);
SPAGAIN;
if (count != 1) {
warn("cursor->EOF() method returned %d vals instead of 1", count);
SP -= count;
croak("cursor->EOF() method returned %d vals instead of 1", count);
}
else {
SV *sv = POPs; /* need 2 lines, because this doesn't work : */