diff --git a/src/helper.cpp b/src/helper.cpp index d283a15..5f00eb6 100644 --- a/src/helper.cpp +++ b/src/helper.cpp @@ -50,7 +50,11 @@ void tcp_cleanup() { // // Convert sg to plato // -double convertToPlato(double sg) { return 259 - (259 / sg); } +double convertToPlato(double sg) { + if (sg) + return 259 - (259 / sg); + return 0; +} // // Convert plato to sg