From 518cce5d783354f2ae9159aabf2afcebf882d981 Mon Sep 17 00:00:00 2001 From: xuzhenbao Date: Mon, 14 Oct 2024 10:27:09 +0800 Subject: [PATCH] Resolve parsing descriptor file error when char data is unsigned --- libs/dfi/CMakeLists.txt | 2 +- libs/dfi/src/dyn_descriptor.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/dfi/CMakeLists.txt b/libs/dfi/CMakeLists.txt index f6787d987..1b2dde5ec 100644 --- a/libs/dfi/CMakeLists.txt +++ b/libs/dfi/CMakeLists.txt @@ -41,7 +41,7 @@ if (CELIX_DFI) target_link_libraries(dfi PUBLIC jansson::jansson Celix::utils)##The public header file(dyn_interface.h) Celix::utils(celix_version.h) set_target_properties(dfi PROPERTIES C_VISIBILITY_PRESET hidden - VERSION "1.3.0" + VERSION "1.3.1" "SOVERSION" 1 OUTPUT_NAME "celix_dfi") diff --git a/libs/dfi/src/dyn_descriptor.c b/libs/dfi/src/dyn_descriptor.c index be5ad8fa1..5ba8f9d05 100644 --- a/libs/dfi/src/dyn_descriptor.c +++ b/libs/dfi/src/dyn_descriptor.c @@ -127,13 +127,13 @@ int celix_dynDescriptor_parse(celix_descriptor_t* descriptor, FILE* stream, int (*parseSection)(celix_descriptor_t* descriptor, const char* secName, FILE *stream)) { int status = OK; - char peek = (char)fgetc(stream); + int peek = fgetc(stream); while (peek == ':') { ungetc(peek, stream); if ((status = celix_dynDescriptor_parseSection(descriptor, stream, parseSection)) != OK) { return status; } - peek = (char)fgetc(stream); + peek = fgetc(stream); } if (peek != EOF) {