Jump to content

Suspected false positive when coding in Visual Basic 2010

Recommended Posts

Hi, first post to this forum. Sorry if this is in the wrong place.

I'm currently programming in VB and whenever I run my code an alert says that malware is detected, specifically:  HEUR:Trojan.Win32.Generic.

Surely I haven't just accidentally coded a Trojan? What can I do to stop this?



My code is here, not sure if this is relevant: 

Module Module1

    Sub Main()

        Dim a = {1, 7, 5, 2, 3, 6, 8, 4, 9}
        Dim value = 0
        Dim low = 0
        Dim high = 0
        Dim mid = 0

        high = a(7)
        low = a(0)
        value = a(5)

        Mid = (high + low) / 2

        Do Until a(value) = a(mid)

            If high < low Then
            End If

            If (a(mid) > value) Then
                low = a(0)
                high = a(mid - 1)
                mid = (high + low) / 2
            ElseIf (a(mid) < value) Then
                low = a(mid + 1)
                high = a(8)
                mid = (high + low) / 2
                Console.WriteLine("In middle of subarray")
            End If

        Console.WriteLine("Not in middle of subarray")

    End Sub

End Module

Share this post

Link to post

  • Create New...

Important Information

We use cookies to make your experience of our websites better. By using and further navigating this website you accept this. Detailed information about the use of cookies on this website is available by clicking on more information.