1
0
forked from perl/perl-PDL
Files
perl-PDL/PDL-2.4.7-return.diff

19 lines
745 B
Diff

Index: Basic/Core/pdlcore.c.PL
===================================================================
--- Basic/Core/pdlcore.c.PL.orig 2016-08-24 09:50:54.761974731 +0200
+++ Basic/Core/pdlcore.c.PL 2016-08-24 09:53:51.996573511 +0200
@@ -608,10 +608,10 @@ void pdl_unpackdims ( SV* sv, PDL_Indx *
PDL_Indx pdl_safe_indterm( PDL_Indx dsz, PDL_Indx at, char *file, int lineno)
{
- if (at >= 0 && at < dsz) return at;
- pdl_barf("access [%d] out of range [0..%d] (inclusive) at %s line %d",
+ if (!(at >= 0 && at < dsz))
+ pdl_barf("access [%d] out of range [0..%d] (inclusive) at %s line %d",
at, dsz-1, file?file:"?", lineno);
- return at; // This can never happen - placed to avoid a compiler warning.
+ return at;
}
/*