View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031975 | FPC | RTL | public | 2017-06-07 20:06 | 2017-07-19 01:25 |
Reporter | M.AUDIO | Assigned To | Michael Van Canneyt | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | x86-64 | OS | Windows | OS Version | 7 |
Product Version | 3.1.1 | Product Build | r36176 | ||
Target Version | 3.2.0 | Fixed in Version | 3.1.1 | ||
Summary | 0031975: TStringHelper Function LastIndexOf Returns Exception | ||||
Description | TStringHelper Function LastIndexOf Returns SIGSEGV. It is confirmed that it's not working at all when passed parameter is of type String. | ||||
Steps To Reproduce | Sample FPC project attached. run in debug mode. | ||||
Tags | lastindexof, TStringHelper | ||||
Fixed in Revision | 36703 | ||||
FPCOldBugId | |||||
FPCTarget | |||||
Attached Files |
|
|
lasti.zip (1,081 bytes) |
|
\rtl\objpas\sysutils\syshelp.inc Line 640 function TStringHelper.LastIndexOf(const AValue: string; AStartIndex: Integer; ACount: Integer): Integer; begin Result:=LastIndexOf(AValue,AStartIndex,AStartIndex+1); end; Basically calls itself infinitely... |
|
I could be wrong but, Could it be this? Result := LastIndexOf(AValue[AstartIndex],AStartIndex+1,ACount); |
|
I don't think so. It can use rpos/rposex, but that would introduce a dependency on strutils. Note IndexOf uses pos(), but pos() is a system function. rpos()/rposex() aren't. |
|
Fixed, thanks for reporting. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-06-07 20:06 | M.AUDIO | New Issue | |
2017-06-07 20:06 | M.AUDIO | File Added: lasti.zip | |
2017-06-07 20:07 | M.AUDIO | Tag Attached: TStringHelper | |
2017-06-07 20:07 | M.AUDIO | Tag Attached: lastindexof | |
2017-06-07 21:27 | Bart Broersma | Note Added: 0100939 | |
2017-06-11 01:11 | jamie philbrook | Note Added: 0101014 | |
2017-06-12 09:52 | Thaddy de Koning | Note Added: 0101047 | |
2017-06-12 09:57 | Thaddy de Koning | Note Edited: 0101047 | View Revisions |
2017-06-12 10:01 | Thaddy de Koning | Note Edited: 0101047 | View Revisions |
2017-06-12 21:40 | Bart Broersma | Note Edited: 0100939 | View Revisions |
2017-07-09 10:43 | Michael Van Canneyt | Fixed in Revision | => 36703 |
2017-07-09 10:43 | Michael Van Canneyt | Note Added: 0101627 | |
2017-07-09 10:43 | Michael Van Canneyt | Status | new => resolved |
2017-07-09 10:43 | Michael Van Canneyt | Fixed in Version | => 3.1.1 |
2017-07-09 10:43 | Michael Van Canneyt | Resolution | open => fixed |
2017-07-09 10:43 | Michael Van Canneyt | Assigned To | => Michael Van Canneyt |
2017-07-09 10:43 | Michael Van Canneyt | Target Version | => 3.2.0 |