LSLib.Granny.GR2.WritableSection.AlignWrite C# (CSharp) Method

AlignWrite() private method

private AlignWrite ( ) : void
return void
        internal void AlignWrite()
        {
            if (Writer == MainWriter)
            {
                // Align the struct so its size (and the address of the subsequent struct) is a multiple of 4
                while ((MainStream.Position % 4) != 0)
                {
                    Writer.Write((Byte)0);
                }
            }
            else
            {
                // Align the struct so its size (and the address of the subsequent struct) is a multiple of 4
                while ((DataStream.Position % 4) != 0)
                {
                    Writer.Write((Byte)0);
                }
            }
        }