Project

General

Profile

Bug #12277

Incorrect behaviour of types.dt_lua_tag_t.#

Added by Christian G 14 days ago.

Status:
New
Priority:
Low
Category:
Lua
Target version:
-
Start date:
08/02/2018
Due date:
% Done:

0%

Affected Version:
2.4.2
System:
Ubuntu
bitness:
64-bit
hardware architecture:
amd64/x86

Description

Accessing values of type types.dt_lua_tag_t by a numbered index (e.g. types.dt_lua_tag_t[3]) actually returns the images that have that tag attached to them, according to documentation. But there seems to be an indexing bug:
  • accessing the first value (types.dt_lua_tag_t[1]) crashes the application
  • accessing the second value (types.dt_lua_tag_t[2]) returns the first image
  • accessing the third value (types.dt_lua_tag_t[3]) returns the second image, etc.
  • the length operator (#types.dt_lua_tag_t) returns the number of images attached with that tag plus 1

Also available in: Atom PDF