From c5d0a45c12f48bfcfad2f0ba6be38fa161c775d7 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 22 Jan 2018 22:29:50 +0000 Subject: [PATCH] label: corrected debug logic for factorial Resolves bug-report https://bugs.openfoam.org/view.php?id=2814 --- src/OpenFOAM/primitives/ints/label/label.C | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/primitives/ints/label/label.C b/src/OpenFOAM/primitives/ints/label/label.C index 10a621f46..630296381 100644 --- a/src/OpenFOAM/primitives/ints/label/label.C +++ b/src/OpenFOAM/primitives/ints/label/label.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,7 +23,6 @@ License \*---------------------------------------------------------------------------*/ -#include "error.H" #include "label.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -69,7 +68,7 @@ Foam::label Foam::factorial(label n) }; #ifdef FULLDEBUG - if (n > 12 && n < 0) + if (n > 12 || n < 0) { FatalErrorInFunction << "n value out of range"