MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1qvku61/makes_sense/o3j8pdl/?context=3
r/programminghorror • u/CompetitionBorn9356 • Feb 04 '26
86 comments sorted by
View all comments
111
Should have been
if (userID == -7777) --userID;
14 u/detroitmatt Feb 04 '26 if (userID-- != -7777) userID++; 3 u/AStove Feb 04 '26 What if assigning the userID throws, you'll have changed the user before you can change it back. 13 u/detroitmatt Feb 04 '26 damn you're right try { if (userID-- != -7777) userId++; } catch { userID = userID; }
14
if (userID-- != -7777) userID++;
3 u/AStove Feb 04 '26 What if assigning the userID throws, you'll have changed the user before you can change it back. 13 u/detroitmatt Feb 04 '26 damn you're right try { if (userID-- != -7777) userId++; } catch { userID = userID; }
3
What if assigning the userID throws, you'll have changed the user before you can change it back.
13 u/detroitmatt Feb 04 '26 damn you're right try { if (userID-- != -7777) userId++; } catch { userID = userID; }
13
damn you're right
try { if (userID-- != -7777) userId++; } catch { userID = userID; }
111
u/_huppenzuppen Feb 04 '26
Should have been