aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2012-02-07 17:07:45 -0500
committerBrian Cully <github.20.shmit@spamgourmet.com>2012-02-07 17:07:45 -0500
commit00e493d0ed990abeece6ae5dc06cb3d634b65bfe (patch)
treec5b59ecba94f839a11bb27610e413d5044f20bb5 /src
parent7b035eb0d53f3c15d5e8da46dfab2d0a174bd517 (diff)
downloadmysqlerl-00e493d0ed990abeece6ae5dc06cb3d634b65bfe.tar.gz
mysqlerl-00e493d0ed990abeece6ae5dc06cb3d634b65bfe.zip
Fix off-by-one when selecting previous rows in port driver.
Diffstat (limited to 'src')
-rw-r--r--src/mysqlerl.c2
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;