Browse Source

Fix dstr_end bug (it's len - 1)

Somewhat of an embarassing fix.  Using 'len' will just return the null
terminator.
jp9000 11 years ago
parent
commit
6d89dde0da
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libobs/util/dstr.h

+ 1 - 1
libobs/util/dstr.h

@@ -313,7 +313,7 @@ static inline char dstr_end(const struct dstr *str)
 	if (dstr_isempty(str))
 		return 0;
 
-	return str->array[str->len];
+	return str->array[str->len - 1];
 }
 
 #ifdef __cplusplus