From 087bed024f68a04d7f6d9ab123132d8bd4e8ef45 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 4 Sep 2012 05:32:19 +0000
Subject: [PATCH]

---
 Common/GmshMessage.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index 59c96c84f6..415c39f730 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -727,14 +727,14 @@ void Msg::ExchangeOnelabParameter(const std::string &key,
     if(val[0] > 0){
       ps[0].setMin(val[0] / fact);
       ps[0].setMax(val[0] * fact);
-      ps[0].setStep((val[0] * fact - val[0] / fact) / 100.);
+      ps[0].setStep((ps[0].getMax() - ps[0].getMin()) / 100.);
     }
     else if(val[0] < 0){
       ps[0].setMin(val[0] * fact);
       ps[0].setMax(val[0] / fact);
-      ps[0].setStep((val[0] / fact - val[0] * fact) / 100.);
+      ps[0].setStep((ps[0].getMax() - ps[0].getMin()) / 100.);
     }
-    if(isInteger){
+    if(val[0] && isInteger){
       ps[0].setMin((int)ps[0].getMin());
       ps[0].setMax((int)ps[0].getMax());
       ps[0].setStep((int)ps[0].getStep());
-- 
GitLab