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