summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-05-07 09:27:53 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-05-07 09:27:53 +0200
commit8e4b3a1e3930fe1b54a94a62ab3521c09fa22df6 (patch)
tree9b0fc76d0c1b397e573df02c69c88291f96af466
parent7c8981b9013519d0be9444f1cfa6933dfe065a89 (diff)
downloadpgfuse-8e4b3a1e3930fe1b54a94a62ab3521c09fa22df6.tar.gz
pgfuse-8e4b3a1e3930fe1b54a94a62ab3521c09fa22df6.tar.bz2
-
-rw-r--r--pgsql.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pgsql.c b/pgsql.c
index 3198137..4932810 100644
--- a/pgsql.c
+++ b/pgsql.c
@@ -82,6 +82,9 @@ static PgDataInfo compute_block_info( size_t block_size, off_t offset, size_t le
if( info.to_len == 0 ) {
info.to_block--;
+ if( info.to_block < 0 ) {
+ info.to_block = 0;
+ }
info.to_len = block_size;
}