From c6c9cb89b6687ed9960cbd3c0fb0b29ce1dff0d4 Mon Sep 17 00:00:00 2001
From: Michael Wild <themiwi@users.sourceforge.net>
Date: Sat, 11 Dec 2010 06:38:47 +0100
Subject: [PATCH] FIX: underflow REPEAT handling in interpolationTable

Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
---
 .../interpolationTable/interpolationTable.C        |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C
index 2bdf04c..a59f703 100644
--- a/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C
+++ b/src/OpenFOAM/interpolations/interpolationTable/interpolationTable.C
@@ -381,7 +381,7 @@ Type Foam::interpolationTable<Type>::operator()(const scalar value) const
             case interpolationTable::REPEAT:
             {
                 // adjust lookupValue to >= 0
-                while (lookupValue < 0)
+                while (lookupValue < minLimit)
                 {
                     lookupValue += maxLimit;
                 }
-- 
1.7.1

