Rudin defines (Def. 2.9) the support $K$ of a complex function $f$ on a topological space $X$ to bet the closure of the set $\{x:f(x)\neq 0\}$. He then claims that if $X$ is not compact and $f$ is a continuous, compactly supported complex function on $X$, $0\in f(X)$, which is clear, but that possibly $0\notin f(K)$, which is not (to me). In particular, it seems like $X$ can't be $\mathbb{R}^n$ unless $f=0$ and $K=\varnothing$.
Since $f$ is continuous, it is continuous at every point in $x\in \mathbb{R}^n$. Then for every neighborhood $V$ of $f(x)$, there is a neighborhood $W$ of $x$ such that $f(W)\subset V$. In particular, let $x\in K\subset \mathbb{R}^n$ such that all neighborhoods of $x$ contain points in $K^c$. Such an $x$ must exist, otherwise $K$ would be open, and therefore (since it is bounded in $\mathbb{R}^n$) not closed. For any neighborhood $W$ of such an $x$, $0\in f(W)$. Then for any neighborhood $V$ of $f(x)$, $0\in V$. Since $\mathbb{C}$ is Hausdorff, then this implies $f(x)=0$, and therefore $0\in f(K)$.
Can anybody point out a mistake in my reasoning?
Note: This seems to be correct, but as is pointed out in the comments, taking $X$ to be some union of disjoint subsets of $\mathbb{R}^n$, with at least one of them bounded, solves the problem by removing the property that no proper subsets of $X$ are both closed and open.