summaryrefslogtreecommitdiff
path: root/libgame
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-10-06 23:24:28 -0700
committerBenjamin Otte <otte@redhat.com>2011-10-06 23:24:28 -0700
commite3e25d642248bfcc0409054447ee7b6d43656a79 (patch)
tree8a3e39dac82d4f7c3bf5ec229e437dd80f4e3cfa /libgame
parentc0ff86479cad9ffe87901e85ad992e1398f07427 (diff)
game: Make game_load_resource() 64bit safe
Code was using guint and gulong interchangably.
Diffstat (limited to 'libgame')
-rw-r--r--libgame/game-game.c6
-rw-r--r--libgame/game-game.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/libgame/game-game.c b/libgame/game-game.c
index b7f8659..0ea12da 100644
--- a/libgame/game-game.c
+++ b/libgame/game-game.c
@@ -96,7 +96,7 @@ game_game_container_init (gpointer g_iface, gpointer iface_data)
static void
game_game_do_load_resource (GameGame *game, const gchar *resource_name,
- guchar **resource, gulong *length, GError **error)
+ guchar **resource, gsize *length, GError **error)
{
char *filename;
GMappedFile *file;
@@ -1013,11 +1013,11 @@ game_game_print (GameGame *game)
* until the game ends, after that it will be freed automatically.
**/
const guchar *
-game_game_load_resource (GameGame *game, const char *resource_name, guint *length,
+game_game_load_resource (GameGame *game, const char *resource_name, gsize *length,
GError **error)
{
guchar *ret = NULL;
- guint len = 0;
+ gsize len = 0;
GError *err = NULL;
g_return_val_if_fail (GAME_IS_GAME (game), NULL);
diff --git a/libgame/game-game.h b/libgame/game-game.h
index afb5a33..e3bc450 100644
--- a/libgame/game-game.h
+++ b/libgame/game-game.h
@@ -99,7 +99,7 @@ struct _GameGameClass
void (* load_resource) (GameGame * game,
const gchar * resource_name,
guchar ** resource,
- gulong * length,
+ gsize * length,
GError ** error);
};
@@ -165,7 +165,7 @@ gboolean game_game_save (GameGame * game,
const guchar * game_game_load_resource (GameGame * game,
const char * resource_name,
- guint * length,
+ gsize * length,
GError ** error);
/* debugging */