Browse Source

const annot

Nicolas Cannasse 7 years ago
parent
commit
1237ed4603
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/alloc.c

+ 3 - 3
src/alloc.c

@@ -1216,11 +1216,11 @@ vdynamic *hl_alloc_dynamic( hl_type *t ) {
 #	define DYN_PAD
 #endif
 
-static vdynamic vdyn_true = { &hlt_bool, DYN_PAD {true} };
-static vdynamic vdyn_false = { &hlt_bool, DYN_PAD {false} };
+static const vdynamic vdyn_true = { &hlt_bool, DYN_PAD {true} };
+static const vdynamic vdyn_false = { &hlt_bool, DYN_PAD {false} };
 
 vdynamic *hl_alloc_dynbool( bool b ) {
-	return b ? &vdyn_true : &vdyn_false;
+	return (vdynamic*)(b ? &vdyn_true : &vdyn_false);
 }