summaryrefslogtreecommitdiffstats
path: root/src/plist.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-12-10 23:42:21 +0100
committerGravatar Jonathan Beck2008-12-10 23:42:21 +0100
commitcd95e9bc6e23949b5cef3996132b79bd8803467a (patch)
treea435658908e506a5cb77a9bdabf8a158144ea6d8 /src/plist.c
parent625633203a27f569bea8890cb269132fea83b497 (diff)
downloadlibplist-cd95e9bc6e23949b5cef3996132b79bd8803467a.tar.gz
libplist-cd95e9bc6e23949b5cef3996132b79bd8803467a.tar.bz2
fix minor programming erro plus enhance plutil to convert bin to xml and xml to bin.
Diffstat (limited to 'src/plist.c')
-rw-r--r--src/plist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plist.c b/src/plist.c
index 431c64a..2a6d4bc 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -1014,16 +1014,16 @@ guint plist_data_hash(gconstpointer key)
case PLIST_REAL:
buff = (char *) &data->intval;
size = 8;
-
+ break;
case PLIST_KEY:
case PLIST_STRING:
buff = data->strval;
size = strlen(buff);
-
+ break;
case PLIST_UNICODE:
buff = data->unicodeval;
size = strlen(buff) * sizeof(wchar_t);
-
+ break;
case PLIST_DATA:
case PLIST_ARRAY:
case PLIST_DICT:
@@ -1267,7 +1267,7 @@ void plist_to_bin(plist_t plist, char **plist_bin, uint32_t * length)
uint8_t *buff = NULL;
uint8_t size = 0;
uint64_t offsets[num_objects];
- for (i = 0; i <= num_objects; i++) {
+ for (i = 0; i < num_objects; i++) {
offsets[i] = bplist_buff->len;
struct plist_data *data = (struct plist_data *) ((GNode *) g_ptr_array_index(objects, i))->data;