diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/char_sql/char.c | 2 | ||||
-rw-r--r-- | src/char_sql/int_homun.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index e13744754..b493028b8 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -2733,7 +2733,7 @@ int parse_frommap(int fd) for( i = 0; i < count; ++i ) { memcpy (&data, RFIFOP(fd, 14+i*sizeof(struct status_change_data)), sizeof(struct status_change_data)); - if( count > 0 ) + if( i > 0 ) StringBuf_AppendStr(&buf, ", "); StringBuf_Printf(&buf, "('%d','%d','%hu','%d','%d','%d','%d','%d')", aid, cid, data.type, data.tick, data.val1, data.val2, data.val3, data.val4); diff --git a/src/char_sql/int_homun.c b/src/char_sql/int_homun.c index 5c0c81f05..bc38e07be 100644 --- a/src/char_sql/int_homun.c +++ b/src/char_sql/int_homun.c @@ -199,7 +199,8 @@ int mapif_load_homunculus(int fd) i = atoi(data); if( i < HM_SKILLBASE || i >= HM_SKILLBASE + MAX_HOMUNSKILL ) continue;// invalid guild skill - homun_pt->hskill[i].id = (unsigned short)i; + i = i - HM_SKILLBASE - 1; + homun_pt->hskill[i].id = (unsigned short)atoi(data); // lv Sql_GetData(sql_handle, 1, &data, NULL); homun_pt->hskill[i].lv = (unsigned short)atoi(data); |