summaryrefslogtreecommitdiff
path: root/transfer.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-06-13 12:05:43 +0200
committerAnton Khirnov <anton@khirnov.net>2019-06-14 16:10:14 +0200
commitebf0e97dbfe895c66226ae264930a6e556f1768b (patch)
tree68a8a87974d478248d3ca8122b73d21af7e1947c /transfer.c
parent3d02e1b61d6aa3e2c4c9be4e0f55dd7d2046dabb (diff)
hackswip
Diffstat (limited to 'transfer.c')
-rw-r--r--transfer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/transfer.c b/transfer.c
index 9c5e125..0ea9413 100644
--- a/transfer.c
+++ b/transfer.c
@@ -422,7 +422,7 @@ int mg2di_gt_init(GridTransferContext *ctx)
double src_start, src_end, dst_start, dst_end;
if (ctx->src.step[i] <= 0.0 || ctx->dst.step[i] <= 0.0 ||
- ctx->src.size[i] < 2 || ctx->dst.size[i] < 1)
+ ctx->src.size[i] < 1 || ctx->dst.size[i] < 1)
return -EINVAL;
src_start = ctx->src.start[i] * ctx->src.step[i] - ctx->extrapolate_distance;
@@ -430,7 +430,7 @@ int mg2di_gt_init(GridTransferContext *ctx)
dst_start = ctx->dst.start[i] * ctx->dst.step[i];
dst_end = (ctx->dst.start[i] + ctx->dst.size[i] - 1) * ctx->dst.step[i];
- if (src_start >= src_end || dst_start < src_start || dst_end > src_end)
+ if (src_start > src_end || dst_start < src_start || dst_end > src_end)
return -EINVAL;
}