Replace macro with static inline and use bounds checking
Attach a file by drag & drop or click to upload