I agree with you, this is exactly what is happening (and nice catch spotting this just from the observed behaviour).
The code that parses these rooms contains the line (gen-room.c:1913):
where t is a pointer into the room template. Due to C's confusion between char-pointers and strings, atoi will read as many successive characters as possible from the room template and try to convert them into a number.
The code that parses these rooms contains the line (gen-room.c:1913):
Code:
doorpos = atoi(t);
Comment