| 09-01-2004, 02:55 PM | #1 |
is there anyway to detect if a string being passed to execute func is invalid cause it causes instant crash?, thx in advance =) |
| 09-01-2004, 03:13 PM | #2 |
Well, there might be one. The strings for the functions are actually in the strings table and they likely have a low number. So it might be possible to check for that with the return bug. |
| 09-01-2004, 03:51 PM | #3 | |
Quote:
|
| 09-01-2004, 06:44 PM | #4 |
well vex you do have the best answer and im probably going to end up having to go down that route, but aiandy were can i find this string table? cause if i could turn this into a function or a method it would probably be very helpful for alot of people |
| 09-01-2004, 07:32 PM | #5 |
There have been several investigations done with the return bug. When you use it on strings you get the same value for the same string content. So we assume that these values point to a string table where are strings are contained. I know that all the function names are contained in there too so you could try to find out what numbers are assigned to them. Now that return value of strings has not been investigated thoroughly enough so it would be better to first try around with that stuff a bit more. |
| 09-01-2004, 07:53 PM | #6 |
so do you not know where this table is? sorry for being so persistant :( but i wanna figure this out, im going with just reducing the possible of a bad value being passed but this is still interesting. |
| 09-01-2004, 08:08 PM | #7 | |
Quote:
|
| 09-01-2004, 11:53 PM | #8 |
Are you sure they change ? |
| 09-02-2004, 12:23 PM | #9 | |
Quote:
Too bad the game was crashing for mysterius reasons, and only stopped crashing after I reverted the integers to strings. |
| 09-02-2004, 12:29 PM | #10 |
I guess investigating that behavior of the strings could be interesting. Might give us new insight into how strings work in War3. |
| 09-02-2004, 11:14 PM | #11 |
The string table (the list of strings you get from using the return bug, may not be what you refer to as a string table AIAndy) is something like a dynamic array of strings. If you try to access an array element that is out of bounds the game crashes. Also everytime you output a string or enter a string in the chat, the array is incremented by that string. You can instantaneously approximate the maximum size of the array by generating a random string and displaying it. Using this, I searched the array starting at 0 but found no names of functions? |
| 09-03-2004, 12:04 AM | #12 |
I am sure they are in there as I got them as a return for calling string returning common.j natives in AI (they return the wrong thing then). Else I'd not know how I got them then. |
