Last modified: 2013-11-15 11:08:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52176, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50176 - mw.ustring.byteoffset wrong for negative 'i' in LuaSandbox
mw.ustring.byteoffset wrong for negative 'i' in LuaSandbox
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Brad Jorsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-25 14:05 UTC by Brad Jorsch
Modified: 2013-11-15 11:08 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brad Jorsch 2013-06-25 14:05:53 UTC
From https://en.wikipedia.org/wiki/Wikipedia_talk:Lua#mw.ustring.byteoffset_bug:

> Does mw.ustring.byteoffset work correctly with negative offsets? Putting the
> following into the debug window gives the values shown:
> 
> for i = -1, -5, -1 do print(i, mw.ustring.byteoffset('abcde', 0, i)) end
> -1   3
> -2   2
> -3   1
> -4   nil
> -5   nil
> 
> I don't need the function—I'm just asking if it has a bug. Johnuniq (talk)
> 02:22, 25 June 2013 (UTC)

Further investigation reveals that the LuaStandalone implementation works correctly, it's only LuaSandbox that has the problem.

Patch to be submitted momentarily.
Comment 1 Gerrit Notification Bot 2013-06-25 14:07:38 UTC
Related URL: https://gerrit.wikimedia.org/r/70421 (Gerrit Change Iceee1022a55abd7a08df1ea7843e1277eb02798b)
Comment 2 Brad Jorsch 2013-06-25 16:39:19 UTC
Change merged. It will most likely be deployed to WMF wikis along with 1.22wmf9, see https://www.mediawiki.org/wiki/MediaWiki_1.22/Roadmap for the schedule.
Comment 3 Gerrit Notification Bot 2013-11-14 15:20:04 UTC
Change 95409 had a related patch set uploaded by MarkAHershberger:
Fix LuaSandbox mw.ustring.byteoffset with negative 'i'

https://gerrit.wikimedia.org/r/95409
Comment 4 Gerrit Notification Bot 2013-11-14 16:47:13 UTC
Change 95409 abandoned by MarkAHershberger:
Fix LuaSandbox mw.ustring.byteoffset with negative 'i'

https://gerrit.wikimedia.org/r/95409
Comment 5 Andre Klapper 2013-11-15 11:08:07 UTC
No open patches to review here (backport patches got abandoned), hence resetting status to RESOLVED FIXED. Backport_to_Stable flag might be set to "-" by hexmode.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links