From 8e5b0977192e005e5b1c25f585c76a38befe5455 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Tue, 16 Apr 2013 10:10:24 +0900 Subject: [PATCH] (concord_object_get_feature_value): Use `cos_read_int' to parse integer. --- cos.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cos.c b/cos.c index 9e09502..303b2dd 100644 --- a/cos.c +++ b/cos.c @@ -416,6 +416,7 @@ concord_object_get_feature_value (COS_object object, COS_object feature) size_t end; int val_cid; COS_String val_str; + COS_object val_obj; if (COS_OBJECT_CHAR_P (object)) { @@ -440,6 +441,12 @@ concord_object_get_feature_value (COS_object object, COS_object feature) concord_feature_get_name (fobj), cos_string_data (val_string)); + val_obj = cos_read_int (CONCORD_String_data (&val_st), + CONCORD_String_size (&val_st), + 0, &end); + if ( val_obj != NULL ) + return val_obj; + val_cid = cos_read_char (CONCORD_String_data (&val_st), CONCORD_String_size (&val_st), 0, &end); -- 1.7.10.4