View Issue Details

IDProjectCategoryView StatusLast Update
0008379Multi Theft Auto : San AndreasScriptingpublic2018-07-16 19:19
ReporterCheezAssigned Tosbx320 
PrioritylowSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.4 
Target Version1.5Fixed in Version1.5 
Summary0008379: Client-side File:read(0) doesn't return a warning while Server-side File:read(0) does
Description

I think there should be no warning when reading 0 bytes.
Both functions (server and client) return nil when reading 0 bytes, but when you try to read 0 bytes on the server-side you get a warning, while on the client-side you don't.

Steps To Reproduce

local File = File("file.txt"); -- let's say this file is empty;
local Size = File:getSize(); -- returns 0;
local Data = File:read(Size) -- returns nil, but on server-side also shows a warning;

Additional Information

WARNING: script.lua:1: Bad usage @ 'read' [Bad number of bytes]
(Only shows when you supply 0 as the number of bytes on the server-side)

TagsNo tags attached.

Relationships

related to 0006262 resolvedsbx320 fileRead(file, 0) should return empty string 

Activities

Issue History

Date Modified Username Field Change