Modify

Opened 17 years ago

Closed 17 years ago

#656 closed Bug (Fixed)

_FileCountLines and AutoIt v3.2.13.9 (Beta) - wrong return on one line

Reported by: maraaa Owned by: Gary
Milestone: 3.2.13.10 Component: Standard UDFs
Version: 3.2.13.9 Severity: Blocking
Keywords: bad return, _FileCountLines Cc:

Description

When only one line is present in file, _FileCountLines will return 0 instead of 1

Most Venerable Penguin
Group Icon

Group: AutoIt MVPs (MVP)
Posts: 7,190
Joined: 12-December 05
From: Victoria Crater, Mars
Member No.: 9,334

Issue is not present with 3.2.12.1 but is present with 3.2.13.9. Example script:
#include <File.au3>
$sFile = _TempFile()
$hFile = FileOpen($sFile, 2)
FileWrite($hFile, "One line of text.")
FileClose($hFile)
ConsoleWrite("Count = " & _FileCountLines($sFile) & @LF)
FileDelete($sFile)

Change History (1)

comment:1 Changed 17 years ago by Gary

  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version: 3.2.13.10

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.