Permalink
Browse files

(raptor_new_term_from_literal): Cast language length again

  • Loading branch information...
dajobe committed Jun 11, 2012
1 parent 4815c33 commit 933fec1c1e7e94497482bdb20eea9f61b630e5e4
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/raptor_term.c
View
@@ -265,7 +265,7 @@ raptor_new_term_from_literal(raptor_world* world,
const unsigned char* language)
{
size_t literal_len = 0;
- unsigned char language_len = 0;
+ size_t language_len = 0;
RAPTOR_CHECK_CONSTRUCTOR_WORLD(world);
@@ -275,10 +275,11 @@ raptor_new_term_from_literal(raptor_world* world,
literal_len = strlen(RAPTOR_GOOD_CAST(const char*, literal));
if(language)
- language_len = RAPTOR_GOOD_CAST(unsigned char, strlen(RAPTOR_BAD_CAST(const char*, language)));
+ language_len = strlen(RAPTOR_GOOD_CAST(const char*, language));
return raptor_new_term_from_counted_literal(world, literal, literal_len,
- datatype, language, language_len);
+ datatype, language,
+ RAPTOR_BAD_CAST(unsigned char, language_len));
}

0 comments on commit 933fec1

Please sign in to comment.