Skip to content

Commit

Permalink
Extensions/paster: Fix bug introduced by StrToInt.
Browse files Browse the repository at this point in the history
It now raises an exception, so use StrToIntDef instead.
  • Loading branch information
MerlijnWajer committed Jul 26, 2011
1 parent a8cdf77 commit 31df8c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Extensions/paster.sex
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ begin
HOST := HOSTDef;
if (InputQuery(GetName + ' ' + GetVersion + ' Extension', 'Which ID would you like to grab?', Data)) then
begin
if IntToStr(StrToInt(Data)) = Data then
if IntToStr(StrToIntDef(Data, -1)) = Data then
Data := '{"paste_id": ' + Data + '}'
else
Data := '{"paste_id": "' + Data + '"}';
Expand Down

0 comments on commit 31df8c6

Please sign in to comment.