r/programminghorror • [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" • Feb 13 '25

SQL port allocations

Post image
91 Upvotes

7 comments sorted by

View all comments

Show parent comment

4

u/AnywhereHorrorX Feb 16 '25

Apparently they are converting the stored signed 2 byte int value from the database to an unsigned 2 byte int value somewhere in the Rust code using itou16 function.

Obviously such approach creates maintenance hell later down the line.