diff options
author | drh <> | 2025-03-27 10:59:18 +0000 |
---|---|---|
committer | drh <> | 2025-03-27 10:59:18 +0000 |
commit | 7b3477c7764cb48cfc676454f9a35c377cb7c79f (patch) | |
tree | 592492ceed03b1ab6d7e2b395505b2ee8c65c552 /src | |
parent | 87ceb6ba9e758fe3bfb8cc9b67f2b75accafba97 (diff) | |
download | sqlite-7b3477c7764cb48cfc676454f9a35c377cb7c79f.tar.gz sqlite-7b3477c7764cb48cfc676454f9a35c377cb7c79f.zip |
Fix an off-by-one bug in the ".dbtotxt" command from the shell that results
in incorrect output.
FossilOrigin-Name: 2345094e879c5538bfea005785ce0848e6d565a49bcb48b323c258d00ccbe9b8
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell.c.in b/src/shell.c.in index 8272956eb..4efcfee95 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -6855,7 +6855,7 @@ static int shell_dbtotxt_command(ShellState *p, int nArg, char **azArg){ for(j=0; j<16 && aLine[j]==0; j++){} if( j==16 ) continue; if( !seenPageLabel ){ - sqlite3_fprintf(p->out, "| page %lld offset %lld\n", pgno, pgno*pgSz); + sqlite3_fprintf(p->out, "| page %lld offset %lld\n",pgno,(pgno-1)*pgSz); seenPageLabel = 1; } sqlite3_fprintf(p->out, "| %5d:", i); |