1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-21 16:55:01 -05:00

Extensions/paster: Fix bug introduced by StrToInt.

It now raises an exception, so use StrToIntDef instead.
This commit is contained in:
Merlijn Wajer 2011-07-26 19:30:41 +02:00
parent a8cdf77d87
commit 31df8c695a

View File

@ -87,7 +87,7 @@ begin
HOST := HOSTDef; HOST := HOSTDef;
if (InputQuery(GetName + ' ' + GetVersion + ' Extension', 'Which ID would you like to grab?', Data)) then if (InputQuery(GetName + ' ' + GetVersion + ' Extension', 'Which ID would you like to grab?', Data)) then
begin begin
if IntToStr(StrToInt(Data)) = Data then if IntToStr(StrToIntDef(Data, -1)) = Data then
Data := '{"paste_id": ' + Data + '}' Data := '{"paste_id": ' + Data + '}'
else else
Data := '{"paste_id": "' + Data + '"}'; Data := '{"paste_id": "' + Data + '"}';