summaryrefslogtreecommitdiff
path: root/transfer.c
diff options
context:
space:
mode:
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;
}