]> git.sur5r.net Git - cc65/commitdiff
Be more tolerant with dos/windows line endings.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 11 Nov 2008 21:16:51 +0000 (21:16 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 11 Nov 2008 21:16:51 +0000 (21:16 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3901 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65html/ca65html

index 521c5421ce1ab2387c9b9dc6aab17bd9f1f95b1c..574b696a81237003f332621fdc39bc960f23724b 100755 (executable)
@@ -560,8 +560,9 @@ sub Process2 {
         # Count input lines
         $LineNo++;
 
-       # Remove the newline
-       chomp ($Line);
+       # Remove the newline at the end of line. Don't use chomp to be able to
+        # read dos/windows sources on unices.
+        $Line =~ s/[\r\n]*$//;
 
         # If requested, convert tabs to spaces
        if ($CvtTabs) {