Issue: TIntegerArray.returnInArray incorrectly returns 0 when not found

  1. issueid=480 03-18-2017 11:08 PM
    SRL Junior Member
    TIntegerArray.returnInArray incorrectly returns 0 when not found

    TIntegerArray.returnInArray incorrectly returns 0 when not found. Documented/desired result is (-1) when not found.

    Original code:
    Code:
    function TIntegerArray.returnInArray(const int : Integer) : Integer;
    begin
      inIntArrayEx(self, result, int);
    end;
    Fixed:
    Code:
    function TIntegerArray.returnInArray(const int : Integer) : Integer;
    begin
      if not inIntArrayEx(self, result, int) then
        result := (-1);
    end;
Issue Details
Issue Number 480
Project SRL Bugs and Suggestions
Status Unconfirmed
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)




+ Reply