This patch was provided by Krytarik Raido via unit93 https://github.com/veracrypt/VeraCrypt/issues/198#issuecomment-341453420