Mercurial > vim
view runtime/macros/maze/maze.c @ 30970:6d6545c99597 v9.0.0820
patch 9.0.0820: memory leak with empty shell command
Commit: https://github.com/vim/vim/commit/03d6e6f42b0deeb02d52c8a48c14abe431370c1c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 29 21:53:08 2022 +0100
patch 9.0.0820: memory leak with empty shell command
Problem: Memory leak with empty shell command.
Solution: Free the empty string.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 02 Nov 2022 11:18:50 +0100 |
parents | 3fc0f57ecb91 |
children |
line wrap: on
line source
char*M,A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf(M="%d",&C); -- E; J[ E] =T [E ]= E) printf("._"); for(;(A-=Z=!Z) || (printf("\n|" ) , A = 39 ,C -- ) ; Z || printf (M ))M[Z]=Z[A-(E =A[J-Z])&&!C & A == T[ A] |6<<27<rand()||!C&!Z?J[T[E]=T[A]]=E,J[T[A]=A-Z]=A,"_.":" |"];}