Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
Demos
ActiveX
ADO
Apps
Components
Corba
Data
Database
Doc Demos
Internet
MFC
Midas
Other
StdLib
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/Demos/Other
[ Add a report in this area ]
Report #:
4307
Status:
Reported
ResXplor fails to present stringtables with empty strings
Project:
Delphi
Build #:
6.0.6.240
Version:
6.0
Submitted By:
Peter Laman
Report Type:
Basic functionality failure
Date Reported:
5/5/2003 1:48:08 AM
Severity:
Infrequently encountered problem
Last Updated:
1/8/2008 3:30:51 PM
Platform:
All versions
Internal Tracking #:
Resolution:
None
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
(1 Total Rating)
2.00 out of 5
Total Votes:
None
Description
If a stringtable block contains an empty string, the rest of the block is not displayed.
Steps to Reproduce:
This is due to a bug in the TStringResource.AssignTo method in unit ExeImage. The main loop of this method is:
while Cnt < StringsPerBlock do
begin
Len := Word(P^);
if Len > 0 then
begin
Inc(P);
ID := ((FDirEntry.Name - 1) shl 4) + Cnt;
Add(Format('%d, "%s"', [ID, WideCharToStr(P, Len)]));
Inc(P, Len);
end;
Inc(Cnt);
end;
So, if a string is empty, P will not be incremented and the rest of the loop will use the same empty string. The solution is to add an else part to increment P:
while Cnt < StringsPerBlock do
begin
Len := Word(P^);
if Len > 0 then
begin
Inc(P);
ID := ((FDirEntry.Name - 1) shl 4) + Cnt;
Add(Format('%d, "%s"', [ID, WideCharToStr(P, Len)]));
Inc(P, Len);
end
else
Inc(P); //Advance to next string
Inc(Cnt);
end;
Workarounds
None
Attachment
None
Comments
None
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us