Sign in to follow this  

[.net] overflow

This topic is 3572 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on a chip 8 emulator and right now I'm trying to read a rom into an array of bytes but I keep getting an overflow. I don't know why this is?
Public Class Form1
    Dim ram(&HFFF) As Byte
 
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ReadFile()

    End Sub

    Sub ReadFile()
        Dim ofile As IO.File
        Dim oRead As IO.StreamReader
        Dim i As Integer
        i = 0

        oRead = ofile.OpenText("c:\roms/c8games/UFO")
        While Not oRead.EndOfStream

            ram(i) = oRead.Read()

            i += 1
        End While
     
     End Sub
End Class

Share this post


Link to post
Share on other sites

This topic is 3572 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this