Skip to content

Commit

Permalink
fix - Assertion `s <= e' failed in Escargot::StringView::StringView (#…
Browse files Browse the repository at this point in the history
…238)

related #237

Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
  • Loading branch information
kisbg authored and yichoi committed May 7, 2019
1 parent d788b0b commit 6e76ed1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/GlobalObjectBuiltinIntl.cpp
Expand Up @@ -775,7 +775,7 @@ static IntlMatcherResult lookupMatcher(ExecutionState& state, const Vector<Strin
size_t extensionIndex = locale->find(String::fromASCII("-u-"));
RELEASE_ASSERT(extensionIndex != SIZE_MAX);

size_t extensionLength = locale->length() - extensionIndex;
size_t extensionLength = locale->length();
size_t end = extensionIndex + 3;
while (end < locale->length()) {
end = locale->find(String::fromASCII("-"), end);
Expand Down
20 changes: 20 additions & 0 deletions test/regression-tests/issue-237.js
@@ -0,0 +1,20 @@
/* Copyright 2019-present Samsung Electronics Co., Ltd. and other contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Intl.NumberFormat('en-u-foo-U-foo')

0 comments on commit 6e76ed1

Please sign in to comment.