Pārlūkot izejas kodu

libobs: Fix crashes from wrong types

James Park 6 gadi atpakaļ
vecāks
revīzija
4afdf70fd5
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      libobs/obs-properties.c

+ 2 - 2
libobs/obs-properties.c

@@ -156,7 +156,7 @@ static inline void int_data_free(struct int_data *data) {
 		bfree(data->suffix);
 }
 
-static inline void float_data_free(struct int_data *data) {
+static inline void float_data_free(struct float_data *data) {
 	if (data->suffix)
 		bfree(data->suffix);
 }
@@ -897,7 +897,7 @@ double obs_property_float_step(obs_property_t *p)
 
 const char *obs_property_float_suffix(obs_property_t *p)
 {
-	struct int_data *data = get_type_data(p, OBS_PROPERTY_FLOAT);
+	struct float_data *data = get_type_data(p, OBS_PROPERTY_FLOAT);
 	return data ? data->suffix : NULL;
 }