Changeset - r3584:c30c36fc2a35
[Not reviewed]
master
0 3 0
KUDr - 19 years ago 2006-04-18 18:02:52
kudr@openttd.org
(svn r4470) -Fix: FS#97 — Possible bug in Win64 versions (by michi_cc)
Doesn't fix any known bug, but the code is now bit cleaner. The proper result of subtraction of two pointers is ptrdiff_t.
3 files changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
saveload.c
Show inline comments
 
@@ -722,7 +722,7 @@ void SlObject(void *object, const SaveLo
 
	}
 

	
 
	for (; sld->cmd != SL_END; sld++) {
 
		void *ptr = (byte*)object + (unsigned long)sld->address;
 
		void *ptr = (byte*)object + (ptrdiff_t)sld->address;
 
		SlObjectMember(ptr, sld);
 
	}
 
}
settings.h
Show inline comments
 
@@ -71,7 +71,7 @@ typedef enum {
 
 * to add this to the address of the object */
 
static inline void *ini_get_variable(const SaveLoad *sld, const void *object)
 
{
 
	return (object == NULL) ? sld->address : (byte*)object + (unsigned long)sld->address;
 
	return (object == NULL) ? sld->address : (byte*)object + (ptrdiff_t)sld->address;
 
}
 

	
 
void IConsoleSetPatchSetting(const char *name, const char *value);
stdafx.h
Show inline comments
 
@@ -3,6 +3,7 @@
 
#ifndef STDAFX_H
 
#define STDAFX_H
 

	
 
#include <stddef.h>
 
#include <stdio.h>
 
#include <string.h>
 
#include <stdlib.h>
0 comments (0 inline, 0 general)