fix some integer conversions in the Table class #60
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -19,6 +19,7 @@
 | 
				
			||||||
** along with mkxp.  If not, see <http://www.gnu.org/licenses/>.
 | 
					** along with mkxp.  If not, see <http://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <algorithm>
 | 
				
			||||||
#include "table.h"
 | 
					#include "table.h"
 | 
				
			||||||
#include "binding-util.h"
 | 
					#include "binding-util.h"
 | 
				
			||||||
#include "serializable-binding.h"
 | 
					#include "serializable-binding.h"
 | 
				
			||||||
| 
						 | 
					@ -26,7 +27,7 @@
 | 
				
			||||||
static int num2TableSize(VALUE v)
 | 
					static int num2TableSize(VALUE v)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int i = NUM2INT(v);
 | 
						int i = NUM2INT(v);
 | 
				
			||||||
	return i >= 0 ? i : 0;
 | 
						return std::max(0, i);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void parseArgsTableSizes(int argc, VALUE *argv, int *x, int *y, int *z)
 | 
					static void parseArgsTableSizes(int argc, VALUE *argv, int *x, int *y, int *z)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue