Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit f462763

Browse files
committed
Updates after Seb's feedback #2
1 parent 3c85b1d commit f462763

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

engine/src/srvcgi.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,14 +1519,14 @@ bool MCServerStartSession()
15191519

15201520
MCAutoStringRef t_session_id;
15211521
MCAutoStringRef t_cookie_id;
1522-
1523-
/* UNCHECKED */ MCStringCreateWithCString(MCsessionid, &t_session_id);
1524-
1525-
if (*t_session_id == nil)
1522+
1523+
if (MCsessionid == nil)
15261524
{
15271525
t_success = MCServerGetSessionIdFromCookie(&t_cookie_id);
1528-
t_session_id = t_cookie_id;
1526+
t_session_id = *t_cookie_id;
15291527
}
1528+
else
1529+
/* UNCHECKED */ MCStringCreateWithCString(MCsessionid, &t_session_id);
15301530

15311531
if (t_success)
15321532
{

engine/src/srvoutput.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,13 +496,13 @@ bool MCServerSetCookie(MCStringRef p_name, MCStringRef p_value, uint32_t p_expir
496496

497497
if (t_success && MCStringGetLength(p_name) != 0 && MCStringGetLength(p_path) != 0 && MCStringGetLength(p_domain) != 0)
498498
t_success = true;
499-
499+
500+
MCAutoStringRef t_encoded;
500501
if (t_success && MCStringGetLength(p_value) != 0)
501502
{
502503
MCExecPoint ep;
503504
ep.setsvalue(MCStringGetCString(p_value));
504505
MCU_urlencode(ep);
505-
MCAutoStringRef t_encoded;
506506
t_success = ep .copyasstringref(&t_encoded);
507507
// p_value = MCValueRetain(*t_encoded);
508508

0 commit comments

Comments
 (0)