Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"for in" code on mr_cddc avoid install on Delphi 7. #1

Open
GoogleCodeExporter opened this issue Mar 29, 2015 · 0 comments
Open

"for in" code on mr_cddc avoid install on Delphi 7. #1

GoogleCodeExporter opened this issue Mar 29, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Try to install the package in Delphi 7

What is the expected output? What do you see instead?
The package gets installed. An sintax error on mr_cddc.pas, line 623, in a "for 
in" code.

What version of the product are you using? On what operating system?
r1263. Windows XP.


Please provide any additional information below.
This single line prevents the install of the package on Delphi 7. Changing this 
to the good-old "for to" makes it compile and install again.

Here's a patch.

-------------------------------------
Index: mr_cddb.pas
===================================================================
--- mr_cddb.pas (revision 1263)
+++ mr_cddb.pas (working copy)
@@ -600,6 +600,7 @@
   CutBuffer: TStringList;
   posDelim: Integer;
   strEnum: string;
+  f:integer;
 begin
   result := 'windows-1252';
   CutBuffer := TStringList.create;
@@ -620,13 +621,17 @@
       end;
     end;
     // look for a line with charset
-    for strEnum in CutBuffer do
+    for f := 0 to CutBuffer.Count - 1 do
+    begin
+      StrEnum := CutBuffer[F];
+
       if (Pos(c_charset, strEnum) > 0) then
       begin
         Result := Copy(strEnum,
           Pos('=', strEnum) + 1,
           Length(strEnum));
       end;
+    end;
   finally
     FreeAndNil(CutBuffer);
   end;

Original issue reported on code.google.com by paulorsb...@gmail.com on 14 Mar 2014 at 10:19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant