```python
def pad_code(code: str, width: int) -> str:
    """A code padded with zeros to a fixed width."""
    if width <= 0:
        raise ValueError("Width must be a positive integer")
    if not code:
        return code
    if len(code) >= width:
        return code
    return code.zfill(width)
```