twig / dcxdll

Dialog Control eXtensions for mIRC
BSD 3-Clause "New" or "Revised" License
23 stars 2 forks source link

Edit field bug (xdid -i) - strcpyn() failed #14

Closed Loveness closed 7 years ago

Loveness commented 7 years ago

Considering this code:

xdialog -c xcomms 1 edit 5 43 $calc(%xcomms.h * 2 - 4) $calc(%xcomms.v * 2 - 16) autohs autovs multi readonly
xdid -f xcomms 1 +b default 10 Calibri
xdid -C xcomms 1 +t $rgb(250,249,237)
xdid -C xcomms 1 +bk $rgb(55,55,55)
xdid -x xcomms 1 +

alias xcomm.youtube {
  xdid -i xcomms 1 1 -------------------------------------------
  xdid -i xcomms 1 2 $lang(2124) /youtube [on|off|-d|help] [<link>] [+o]
  xdid -i xcomms 1 3 -------------------
  xdid -i xcomms 1 4 on -> $lang(2125)
  xdid -i xcomms 1 5 off -> $lang(2126)
  xdid -i xcomms 1 6 -d -> $lang(2127)
  xdid -i xcomms 1 7 +o -> $lang(2128)
  xdid -i xcomms 1 8 help -> $lang(770)
  xdid -i xcomms 1 9 $lang(787) -> $lang(2129)
  xdid -i xcomms 1 10 $lang(787) -> $lang(2130)
  xdid -i xcomms 1 11 $lang(787) -> $lang(2131)
  xdid -i xcomms 1 12 $lang(787) -> $lang(2132)
  xdid -i xcomms 1 13 -------------------------------------------
}

returns error:

D_ERROR /xdid ("xcomms 1 -i 11 Notă: -> Comanda /youtube va funcționa indiferent dacă Youtube Catcher e activ sau nu. Youtube Catcher răspunde doar de afișarea conținutului link-urilor din mesajele proprii sau a altora." error: strcpyn() failed!)
/xdid -[switch] [dialog] [ID] [options]
[switch] = depends on control type
[dialog] = the dialog containing the control
[ID] = the ID of the control
[options] = depends on the control type & switch used

After that, i tried to open again and no errors returns and when i tried to open again and again, sometimes this strcpyn() error returns with different value of id: 11, 7 etc.

Although, the dialog is displayed with all data in it perfectly, except the inserted error lines.

OokEek commented 7 years ago

This is part of the debug code used to find unusual copies, i forgot to comment it out for release builds. fixed.