diff options
author | Brian Cully <bjc@kublai.com> | 2012-02-07 17:07:45 -0500 |
---|---|---|
committer | Brian Cully <github.20.shmit@spamgourmet.com> | 2012-02-07 17:07:45 -0500 |
commit | 00e493d0ed990abeece6ae5dc06cb3d634b65bfe (patch) | |
tree | c5b59ecba94f839a11bb27610e413d5044f20bb5 | |
parent | 7b035eb0d53f3c15d5e8da46dfab2d0a174bd517 (diff) | |
download | mysqlerl-00e493d0ed990abeece6ae5dc06cb3d634b65bfe.tar.gz mysqlerl-00e493d0ed990abeece6ae5dc06cb3d634b65bfe.zip |
Fix off-by-one when selecting previous rows in port driver.
-rw-r--r-- | src/mysqlerl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mysqlerl.c b/src/mysqlerl.c index 431b8cd..0ee04ed 100644 --- a/src/mysqlerl.c +++ b/src/mysqlerl.c @@ -666,7 +666,7 @@ handle_prev(ETERM *msg) ecols = make_cols(fields, num_fields); logmsg("resultoffset: %d, num_rows: %d", resultoffset, numrows); - if (resultoffset == 1) { + if (resultoffset <= 1) { resp = erl_format("{selected, ~w, []}", ecols); } else { resultoffset = resultoffset - 1; |