Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

Commit a2799ad

Browse files
committed
Updates after feedback #1 on this branch
1 parent c62227e commit a2799ad

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

engine/src/mblcontrol.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,10 @@ bool MCNativeControl::LookupType(MCStringRef p_type, MCNativeControlType& r_type
365365

366366
bool MCNativeControl::FindByNameOrId(MCStringRef p_name, MCNativeControl*& r_control)
367367
{
368-
char *t_id_end;
369368
uint32_t t_id;
370-
t_id = strtoul(MCStringGetCString(p_name), &t_id_end, 10);
371-
if (t_id_end != MCStringGetCString(p_name))
369+
370+
/* UNCHECKED */ MCStringToInteger(p_name, t_id);
371+
if (!MCStringIsEmpty(p_name))
372372
return FindById(t_id, r_control);
373373

374374
for(MCNativeControl *t_control = s_native_controls; t_control != nil; t_control = t_control -> m_next)

0 commit comments

Comments
 (0)