Commit e3d94033 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Added jsstr_flatten helper and use it to access string buffer in date.c.

parent 16668e82
...@@ -2054,7 +2054,9 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) { ...@@ -2054,7 +2054,9 @@ static inline HRESULT date_parse(jsstr_t *input_str, double *ret) {
DWORD lcid_en; DWORD lcid_en;
input_len = jsstr_length(input_str); input_len = jsstr_length(input_str);
input = input_str->str; input = jsstr_flatten(input_str);
if(!input)
return E_OUTOFMEMORY;
for(i=0; i<input_len; i++) { for(i=0; i<input_len; i++) {
if(input[i] == '(') nest_level++; if(input[i] == '(') nest_level++;
......
...@@ -53,6 +53,12 @@ static inline jsstr_t *jsstr_addref(jsstr_t *str) ...@@ -53,6 +53,12 @@ static inline jsstr_t *jsstr_addref(jsstr_t *str)
return str; return str;
} }
/* This will be failable in the future. */
static inline const WCHAR *jsstr_flatten(jsstr_t *str)
{
return str->str;
}
static inline BOOL jsstr_eq(jsstr_t *str1, jsstr_t *str2) static inline BOOL jsstr_eq(jsstr_t *str1, jsstr_t *str2)
{ {
unsigned len = jsstr_length(str1); unsigned len = jsstr_length(str1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment