Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO]RTE 7: Out of Memory


PD
 Share

Recommended Posts

I get RTE 7 here

```
Public Function ReadString(Optional MoveReadHead As Boolean = True) As String
    Dim sLength As Long
    Dim sBytes() As Byte
    sLength = ReadLong

    If sLength <= 0 Then Exit Function
    ReDim sBytes(sLength - 1) <------------------------------- Error Here!
    CopyMemory sBytes(0), Buffer(ReadHead), sLength
    ReadString = StrConv(sBytes, vbUnicode)

    If MoveReadHead Then ReadHead = ReadHead + sLength
End Function

```
It happens from time to time and its really annoying, I think its because sLength will equal a massive number, about 8 characters.

Any help would be great.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...