From 35bb9ea95bb30475e3796a72b95fe7688a3f5850 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 20 Jul 2018 00:17:58 +0200 Subject: [PATCH] fixed the return value of the ca arg reader --- complex.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/complex.cpp b/complex.cpp index 047693b0..57c088ff 100644 --- a/complex.cpp +++ b/complex.cpp @@ -2966,17 +2966,17 @@ namespace ca { using namespace arg; if(argis("-caprob")) { shift(); prob = argf(); - return true; + return 0; } - if(args()[0] != '-') return false; - if(args()[1] != 'c') return false; + if(args()[0] != '-') return 1; + if(args()[1] != 'c') return 1; int livedead = args()[2] - '0'; - if(livedead < 0 || livedead > 1) return false; + if(livedead < 0 || livedead > 1) return 1; int nei = -1; if(args()[3]) { nei = args()[3] - '0'; - if(nei < 0 || nei > 7) return false; - if(args()[4]) return false; + if(nei < 0 || nei > 7) return 1; + if(args()[4]) return 1; } shift(); string s = args(); s += "00000000"; @@ -2984,7 +2984,7 @@ namespace ca { carule[i][livedead] = s; else carule[nei][livedead] = s; - return true; + return 0; } #endif