A string with predefined length (string[x]) is a "shortstring", the old string-type of Delphi 16-bit and Turbo Pascal, and it is not null-terminated. Instead the first byte is the string length. This means it can contain zero-characters. s:='te'#0'st' is a valid shortstring with length 5 (length stored in s[0]).

As already suggested just do a FillChar(MyRecord, sizeof(TMyRecord), 0) to clear the whole record at once.