mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
remove assertion for false assumption; mrb_str_new(0, len) where len > 0 can be used to allocate an unintialized string
This commit is contained in:
+1
-2
@@ -21,7 +21,6 @@
|
||||
#include "regex.h"
|
||||
#include "st.h"
|
||||
#endif //ENABLE_REGEXP
|
||||
#include <assert.h>
|
||||
|
||||
const char mrb_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
@@ -222,7 +221,7 @@ mrb_value
|
||||
mrb_str_new(mrb_state *mrb, const char *p, int len)
|
||||
{
|
||||
struct RString *s;
|
||||
assert(!(!p && len));
|
||||
|
||||
s = str_new(mrb, p, len);
|
||||
return mrb_obj_value(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user