08-28-2014, 12:36 AM
And I'm just sitting here in my class room
Have fun there
Have fun there
Random Chitchat 2012-2016
|
08-28-2014, 12:36 AM
And I'm just sitting here in my class room
Have fun there
08-28-2014, 03:35 AM
Well, you're sitting in your classroom browsing through MCServer forum, that's not so bad either. Back in my days we had to pay attention at school
08-28-2014, 03:45 AM
I hope you had better teachers then our math teacher, because he didn't show up.
It is supposed, that params at places like this:
Code: inline static void SetBiome(BiomeMap & a_BiomeMap, int a_X, int a_Z, EMCSBiome a_Biome) I'm asking, because MSVS is giving me that warning after I run code analysis tool. http://msdn.microsoft.com/en-us/library/ww5t02fa.aspx
GitHub is confusing me :O
I only want to create a pull request :/ EDIT: I switch base and head and now its working.
08-28-2014, 08:20 PM
(08-28-2014, 06:07 PM)LO1ZB Wrote: It is supposed, that params at places like this: Yes, the ASSERT macro is emptied in Release builds. That's a good point though, what if something tries to write to a_BiomeMap[16 + Width * 16] (a_BiomeMap[272])?
08-28-2014, 09:05 PM
The asserts seem wrong, the comparison to Width should not include equality.
Does VS give you any more information on this particular warning, such as the steps required to reproduce it?
08-28-2014, 09:21 PM
(08-28-2014, 09:05 PM)xoft Wrote: The asserts seem wrong, the comparison to Width should not include equality.Not for this one. (1 of 32 read/write overflow warnings) But I think i know what the problem is. ChunkDev.h line 78 Code: typedef EMCSBiome BiomeMap[Width * Width]; Code: inline static void SetBiome(BiomeMap & a_BiomeMap, int a_X, int a_Z, EMCSBiome a_Biome) a_X + Width * a_Z = 16 + 256 = 272 This would corret the warning: Code: inline static void SetBiome(BiomeMap & a_BiomeMap, int a_X, int a_Z, EMCSBiome a_Biome)
08-28-2014, 09:49 PM
Your change may correct the warning, but it's the wrong code. You need to keep the index calculation as is, and change only the condition inside the ASSERTs, from "a_X <= Width" to "a_X < Width"; if the warning stays, then someone's calling the function wrong and we have to find the bad caller.
08-29-2014, 04:40 AM
Well.. my school wants everyone to buy their own domain so they can eventualy upload their website on it. Any suggestions?
|
« Next Oldest | Next Newest »
|