From a0ff81dc4a1672a03a0d798430ac50d9d2d19241 Mon Sep 17 00:00:00 2001 From: Pradeep Gowda Date: Wed, 27 May 2015 23:18:30 -0400 Subject: [PATCH] use StrToIntDef to return a default value of 0 incase pgrep returns an invalid Integer --- src/ce_common.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ce_common.pas b/src/ce_common.pas index b8ef4c47..e362ddc7 100644 --- a/src/ce_common.pas +++ b/src/ce_common.pas @@ -6,7 +6,7 @@ interface uses - Classes, SysUtils, StrUtils, + Classes, SysUtils, {$IFDEF WINDOWS} Windows, JwaTlHelp32, {$ENDIF} @@ -939,7 +939,7 @@ begin lst := TStringList.Create; try lst.LoadFromStream(proc.Output); - Result := StrToInt(Trim(lst.Text)); + Result := StrToIntDef(Trim(lst.Text), 0); finally lst.Free; end;