wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
551 stars 331 forks source link

E2: fileWrite with big files is broken #2989

Closed Fasteroid closed 6 months ago

Fasteroid commented 6 months ago

Describe the bug New file downloading queue system is doodoo fart

To Reproduce

@name file torture test
@inputs 
@outputs 
@persist Numbers:string Iter Init:string File:number
@trigger

if( first() ){
    Init = "0 1 2 ":repeat(256)
}

event tick(){
    if( Iter < 128 ){
        Numbers = Numbers + Init
        Iter++
    }
    elseif(!File){
        File = 1
        print("writing " + Numbers:length() + " bytes")
        fileWrite(">e2shared/filetest.txt", Numbers)
    }
}

Expected behavior File should eventually write

Actual behavior It never does :trollface:

unknao commented 6 months ago

I wonder if this is why my odometer e2 doesn't save the mileage properly.