[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master a42ac37 085/113: Fixed MakeProfiles loop in ch
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master a42ac37 085/113: Fixed MakeProfiles loop in checking radius values |
Date: |
Fri, 16 Apr 2021 10:33:54 -0400 (EDT) |
branch: master
commit a42ac3769d174eb870656b89693eb2834a23a4bb
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Fixed MakeProfiles loop in checking radius values
While checking the radius column values in MakeProfile's `ui_read_cols_3d',
we hadn't actually defined a loop on `i'. Therefore the `i' value from the
previous loop would remaina and cause an undefined profile code error. With
this commit a loop is added and this bug is fixed.
---
bin/mkprof/ui.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/bin/mkprof/ui.c b/bin/mkprof/ui.c
index f37dc6a..a4801f1 100644
--- a/bin/mkprof/ui.c
+++ b/bin/mkprof/ui.c
@@ -941,11 +941,12 @@ ui_read_cols_3d(struct mkprofparams *p)
p->r=corrtype->array;
/* Check if there is no negative or zero-radius profile. */
- if(p->f[i]!=PROFILE_POINT && p->r[i]<=0.0f)
- error(EXIT_FAILURE, 0, "%s: row %zu, the radius value %g is "
- "not acceptable for a `%s' profile. It has to be larger "
- "than 0", p->catname, i+1, p->r[i],
- ui_profile_name_write(p->f[i]));
+ for(i=0;i<p->num;++i)
+ if(p->f[i]!=PROFILE_POINT && p->r[i]<=0.0f)
+ error(EXIT_FAILURE, 0, "%s: row %zu, the radius value %g is "
+ "not acceptable for a `%s' profile. It has to be larger "
+ "than 0", p->catname, i+1, p->r[i],
+ ui_profile_name_write(p->f[i]));
break;
case 6:
- [gnuastro-commits] master ee4bf1e 069/113: Imported recent work from master, Segment's 3D kernels added, (continued)
- [gnuastro-commits] master ee4bf1e 069/113: Imported recent work from master, Segment's 3D kernels added, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 2c6c7e0 076/113: Imported recent work, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master e2aba57 083/113: Recent work in master imported, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master e92fd9c 039/113: Merged recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 54b099d 043/113: Neighbors options doc generalized for different dimensions, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 5cd3c1e 044/113: Recent work in master merged, small conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 1b0046b 051/113: Recent additions in master imported here, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master b1ea932 054/113: Separate Segment program now available in 3D, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master f537368 066/113: Segment's default 3D configuration file in tarball, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 133e277 071/113: Imported recent work from master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master a42ac37 085/113: Fixed MakeProfiles loop in checking radius values,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 1f9d941 090/113: Imported recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 737a0cd 046/113: Merged recent corrections in master branch, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 486f915 067/113: Imported recent work in master, conflicts fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master d6051a1 074/113: Upperlimit magnitude in 3D, corrected creation of check table, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 5dac3c3 075/113: Recent work in master imported, small conflict in book fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 3882956 077/113: Narrow-band areas from MakeCatalog in 3D datasets, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master abe82cb 086/113: Imported recent work in master, no conflicts, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 924787b 098/113: Updated copyright year in files specific to this branch, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master fbbc2fc 100/113: Imported recent work in master, minor conflict fixed, Mohammad Akhlaghi, 2021/04/16
- [gnuastro-commits] master 22d0fba 089/113: Imported recent work in master, no conflicts, Mohammad Akhlaghi, 2021/04/16